Sample Dynamic Script

To use our dynamic script, simply select Dynamic in the Ready To Use function within the Portal.

Venue Script

For an organization that has multiple locations or that lists/aggregates companies or venues, you can use our dynamic venue widget by selecting Dynamic as the ready to use option.   

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.

 

Event Script

For the dynamic version of the event trip tool, you will pass the variables to us at run, customizing literally hundreds of thousands of events with one dynamic event tool.

Here is a sample script from one of our clients:

<script type=”text/javascript”>if ($(‘#tp-widget’).html() == ”) { tripWidget({eventStart: ‘YYYY/MM/DD’,eventEnd: ‘YYYY/MM/DD’,headerText: ‘Plan your trip to ‘,appendPOI: ‘Y’,poiName: ‘Ed Sheeran Concert at 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.

Please note, if your system uses a different date format from our default date format, you will need to tell us the date format you are using so we can convert it accordingly.