Menu Close

Configuration – DYNAMIC Venue Widget variables

Customizing the Venue Trip Tool

The Venue trip tool supports smart trip planning to a specific site.  The Dynamic version of the Venue tool allows an organization with multiple venues in their site or system to pass data in real time using a combination of the code snippet generated by building a master tool in the TripProximity portal with a custom script.

Select from the tabs below the detailed information about setting up your script and the variables that you may use.

[boc_tabs][boc_tab title=”Download narrative instructions” icon=”icon icon-documents”]

[/boc_tab][boc_tab title=”Sample Dynamic Script” icon=”icon icon-document”]

For an organization that has multiple locations or that lists/aggregates companies or venues, you can use our dynamic venue widget by checking the “Need a dynamic implementation?” box.   This is displayed once you enter the location where you will be installing the tool on your site.  We need this in order to properly support you and assist with testing.

To implement a Dynamic Widget, you start by creating a Master widget in the portal and specify that you want to dynamically provide certain variables at run time.  The supported variables are listed  below under “The Parameters”.

Here is an example of the snippet that is generated by the portal for a Dynamic Widget:

<script type=”text/javascript” data-id=”tp-widget” data-token=”2v5X28Ox418Y5n4538M9aQ3m6ZFRKYg9dDEb18wYviSQ0g1KLug4NmvjN95teSxq” src=”https://widget.tripproximity.com/js/widget.min.js”></script><div class=”tp-widget” id=”tp-widget”></div>

You will provide the values for the variables at run time via a script that maps the values for this rendition of the widget to the variables listed below.

Here is a sample script from one of our clients:

<script type=”text/javascript”>if ($(‘#tp-widget’).html() == ”) { tripWidget({daysFromToday: ‘7’,numberOfDays: ‘1’,headerText: ‘Plan your trip to visit ‘,appendPOI: ‘Y’,poiName: ‘San Diego Civic Center‘,address: ‘3rd Ave & B St, San Diego, CA, United States‘,trackingCode: ‘45048_Event8‘,imageUrl: ‘http://tripproximity.com/wp-content/uploads/2018/06/sandiegociviccenter.jpg‘,imageLink: ‘https://sandiegotheatres.org/‘}) }</script>

In the above script, their data has already been passed using a variable name from their system that translates into the data that you see.

[/boc_tab][boc_tab title=”Setting up Master Widget” icon=”icon icon-flag-checkered”]

When creating the Master Widget, you will set certain default values in the Portal.  There are others that need to be passed to the Dynamic Venue Trip Tool to operate correctly. These must be rendered in the web page as JSON data dictionary within an HTML script tag.  The JavaScript variable name must be set to widgetVars.

If the trip tool is being used for a system that has multiple venues, you will substitute the venue unique VARIABLE NAMES in the Dynamic Venue widget with the correct data from your venue/location page at transaction time.

The variable name must be followed by a colon : and the variable will be ensconced in straight, plain quotation marks. 

Some items are set in the portal and some (denoted below with an *) can be set in the portal and overriden by custom script.

[boc_heading html_element=”h5″]Defaults set in Master only (elements that don’t change) [/boc_heading]

Widget Type

Marketing Message in the Footer

Widget Name


Use Local Currency

Optional Tab Selection (social sharing, driving, flying)

Color Palette

Travel preferences, including brand, # of stars and preferred seat class

Number of rooms and guests


[boc_heading html_element=”h5″]Can be set in Master and overridden with script [/boc_heading]

Header Text (*)

Image URL and Link (*)

Tracking Code (*)

Country (*)

Currency (*)

Active Tab (*)

Trip starts in and Length of Stay (*)

Booking Brand (*)



[/boc_tab][boc_tab title=”Date Variables” icon=”icon icon-calendar3″]
The venue trip tool variables drive the hotel check-in and checkout dates, the car rental pickup and dropoff dates,  and air departure and return dates.  If the hotel dates are changed, the car rental and air dates will reflect the change.  These parameters can be set in the Master Widget and can also be overridden at transaction time, based on a business rule.


Parameter Name
Check-in daysFromToday The number of days from the day the widget is displayed drives  the default check-in. N This is set as a default in the base widget in the TripProximity Portal. daysFromToday: ‘4’,




The number of days of the stay N This is set as a default in the base widget in the TripProximity Portal. numberOfDays: ‘2’,
[/boc_tab][boc_tab title=”Dynamic Variables” icon=”icon icon-refresh-2″]

Following are the variables that can be entered into your script and can be populated at run time.  If the item is present in the Master Widget and absent in the script, the value in the Master Widget will prevail.

Function Variable Name Purpose and example Dynamic


Mandatory Description
Destination poiName Name of the venue to appear as “I need a hotel near” and also on the booking results page (as the POI and the “0.1 miles away from POI NAME” field for each hotel listed.
poiName: ‘Billy Joel Concert’,
Y Y This should be the short version of the name of the venue.  For events, it can be the name of the event.
Widget Header Text headerText Widget title that appears in a transparent container above the widget.
headerText: “Plan your trip to “,
Y Y This can also be a more complete description of an event or venue, in which case you would ensure that the append poi flag is set to N.
Combine Header Text and Venue or Event Name appendPOI Append the POI to the widget title.
appendPOI: ‘Y’,
N N This is set as N as the default.  If set to Yes, the header text and poi_name will be appended.
Image imageUrl The URL for the image on the graphical widget.
imageUrl: ‘https://onpointexecutivecenter.com/wp-content/uploads/2014/03/offices.jpg’,
Y N Optional.  If you do not have your own image, the default image is the Where Should I Stay button from TripProximity.  Your image should be sized to fit in a container up to 350 pixels tall and up to 670 pixels wide.
Image Link imageLink The URL for the link from the image.
imageLink: ‘https://www.solutionz.com’,
Y N This is the link for where the user will go when they click on the image. The link can take you to any other website, blog, page represented by a URL.
Tracking trackingCode Your internal tracking code for your customers or business segments.
trackingCode: ‘HDQ’,
Y Y Can be up to 50 characters, alpha-numeric.  This code will be appended to the tracking code entered into the Master Widget.
Latitude latitude The numeric latitude of the location
latitude: ‘28.4203991’,
Y Y If you provide the lat/long, you will not need an address.
Longitude longitude The numeric longitude of the location
longitude: ‘-81.502967799999968,
Y Y If you provide the lat/long, you will not need an address.
Address address If no geographic coordinates are provided these parameters will be used to calculate the proximity for the hotel search.
address: ‘118 Rue du 4 Septembre, Paris’,
Y N Optional if geographic coordinates were provided.  For enterprise clients, this field can contain the entire address (see example), or can be just the street address if you are using city, state/province, postcode.
Address city The address must be searchable on Google Maps API in order to result in a valid search.
city: ‘Atlanta’,
Y Y Only mandatory if you do NOT use the entire address as the override in the %address% variable field.
Address state The state or province for US or Canadian addresses. Y N Optional (initial lookup is in the address and city, so in most cases, state/province is not needed)
Address postcode The zip or postal code for the address. Y N Optional (initial lookup is in the address and city, so in most cases, postcode is not needed)
Airport airport Three-character airport code
airport: ‘ORD’,
Y N IATA 3-character code representing the closest airport.
Country country Two-digit country code N Y This is set as a default in the base widget in the TripProximity Portal.  Defaults to US, but can be overridden by a business rule.
Currency currency Currency code (i.e. USD, CAD) N N This is set as a default in the base widget in the TripProximity Portal.  The default is USD.  The traveler can change the pricing currency when the results are displayed.
Branding refId This field determines the branding on the booking back end header and footer.  In this example, this is the code for theHotelsNearby.
refId: 6832,
Y Y The default is 6832 for the TripProximity brand.  There are a number of optional niche brands available.  See the portal.
Branding refClickid2 This allows you to choose one of our niche brands, coupled with the use of refid 6832.
refClickId2: ‘hotelsbycompanies’,
Y Y If the refid is set to 6832 to take advantage of one of our brands, you would use the refClickID2 from the full brand list, see the portal.
Default Tab Active_tab Determines which tab will orient as the front window in a multi-tab format N Y This is set as the default in the base widget in the TripProximity Portal.  The HOTEL tab is the default tab.  The tabs remain in the same physical order.  This changes the logical first tab.  The alternative is the MAP tab.  Air and Car tabs cannot be Active tabs.  If the MAP tab is Active, the user must provide their Google API code.
Token dataToken The token number from the widget that you wish to use for tracking


Y N If you have multiple widgets that you have created so that you can track placement source, you can write one script and substitute the correct dataToken at display time.

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading