These widgets display several property features including name of property, overall traveler rating, ranking in a particular geo, traveler photos, recent traveler reviews, management responses, etc. It is also possible to configure a Summary Widget to link to this widget.
Reviews displayed in the widget will match the requested language in the URL. For example, if a widget is configured for French and the location has 50 reviews (none of which are in French), no reviews will be displayed. To then see reviews in English, you could make a second call with the English language parameter.
Options described below are available in the Property Detail widget.
| Configuration Option | Description |
| Show Property Name & Address | Include property name and address within the widget. True/false. |
| Show Description | Include description, if available, for hotels and attractions, or cuisine types for restaurants. True/false. |
| Show Awards | Include the logo for any award the property has won (Traveler's Choice logo and category, Green Leaders, and Certificate of Excellence). True/false. |
| Background color | Partners may provide a widget background color, an iframe background color (for areas of the iframe outside the widget, if any), and choose whether or not to have a border. |
| Use Client IDs Only? | When true, can only use your own location IDs calling for data. Only IDs that have been mapped to a TripAdvisor ID and stored in your TripAdvisor partnership mapping will return content. |
| Write a Review link | Include link to Tripadvisor's (or cobranded if available) Write a Review page for that property. Values are "popup" (open link in a popup), "new" (open link in a new window), or disabled (no link shown). |
| Read All Reviews link | Include link to Tripadvisor's (or cobranded if available) Reviews page for that property. Values are "popup" (open link in a popup), "new" (open link in a new window), or disabled (no link shown). |
| Link: more>> | Should clicking on "more>>" link expand the review to full-text inline (default), or should it take the user to TA to read the full review? |
| Show Management Responses | Whether to include management responses to reviews. True/false. |
Partner widgets are intended to be displayed in an iframe on the partner site. A sample iframe with a widget invocation might look like:
<iframe src="http://www.tripadvisor.com/WidgetEmbed-cdspropertydetail?display=true&
partnerId=PARTNER_KEY&lang=en_US&locationId=120303"width="800" height="1300" scrolling="no"
frameborder="0" marginheight="0" marginwidth="0"></iframe>
All widget URLs include the /WidgetEmbed page followed by the key value for the widget being requested. This is followed by a question mark and the key/value pairs of URL parameters. URL parameter settings are consistent across all widgets. This widget may be optimized for a mobile device using parameters described below.
| Option Name | Description |
| partnerId | Requred. The partner key provided by Tripadvisor to allow partner access to widgets. |
| locationId | Required. This will be the ID of the property requested. This value can be either a TA ID or a partner ID if TA has done a property mapping. Plain text is supported. |
| lang |
The language in which to display the widget. Only reviews in the requested language will be shown. Not including this parameter will defult to en_US and redirect to tripadvisor.com |
| tripType |
Optional. This filters the reviews that are displayed by trip type. Options are: 1, 2, 3, 4, 5, 0.
|
| allowMobile | Optional. This will enable the widget to serve up the mobile optimized version if the user is using a mobile device, and serve up the desktop version if the user is using desktop devices including tablets. If the allowMobile parameter is not included in the url, the widget will always serve up the desktop version regardless of device type. |
| forceMobile=true |
This parameter will force the widget to always serve up mobile optimized version regardless of the device type. This should only be used when the widget is included within a mobile app or mobile webpage. Note that forceMobile=false has the same effect as omitting allowMobile -- it prevents mobile detection. |
This widget has a variable height. The minumum supported width is 600 pixels.
You may dynamically resize the height of the iframe based on the content within the widget. The embedding page will be notified using window.postMessage.
"height=###", this is the height of the iframe. The message only has an impact if the partner site is listening for it and acts on it. In order to capture these messages, you need to add a corresponding Javascript listener to capture the messages if they occur and hide the widget. The following is an example listener skeleton:
<iframe id="MYIFRAME" width="600px" src="http://www.tripadvisor.com/WidgetEmbed-cdspropertydetail?locationId=730099&lang=en_US&partnerId=PARTNER_KEY&isTA=&format=html&display=true"></iframe>
<script type="text/javascript">
function myListener(msg) {
var domainRegex='(https*:\\/\\/.*\\.tripadvisor\\.*)'
var pattern = new RegExp(domainRegex,["i"]);
var match = pattern.exec(msg.origin);
if (match != null && msg.data.substring(0, 7) == "height=") {
var height = msg.data.substring(7,100);
document.getElementById("MYIFRAME").height = height+"px";
}
}
window.addEventListener('message', myListener);
</script>
Feature Call Outs: Write a Review Link. Reviews may be expanded inline so users may read the full text.
![]()
Medium Feature Set: Read all Reviews, awards, no traveler photos, no Write a review link
![]()
Example with Jointly Collected Review Attribution. These reviews have been collected using Tripadvisor’s Review Collection Platform. Partners typically send a post trip email to their customers and invite them to write a review.
![]()
Mobile optimized example: No Photos
![]()