Problem with script when dynamic data is used in HTML panel

Hi - hope someone can help with this…

I’ve added the following code (to show a list of Viator tours on my page) to an HTML panel. It works perfectly when set up like this.

<div data-vi-partner-id="undefined-undefined-id" data-vi-language="en" data-vi-currency="GBP" data-vi-partner-type="VBA" data-vi-url="https://www.viator.com/en-GB/New-York-City/d687-ttd" data-vi-total-products="3"></div>

<script async src="https://uk.viator.com/orion/partner/widget.js"></script>

However, I want to use a dynamic data field instead of the URL (https://www.viator.com/en-GB/New-York-City/d687-ttd), because each thing will have its own URL.

<div data-vi-partner-id="brand-subbrand-id" data-vi-language="en" data-vi-currency="GBP" data-vi-partner-type="VBA" data-vi-url="This_Thing's Location's Viator Link" data-vi-total-products="3"></div>
<script async src="https://uk.viator.com/orion/partner/widget.js"></script>

That seems to insert the thing’s URL correctly, but it stops the Viator list from working.

I suspect it’s something to do with the order in which things are loaded - e.g. the widget.js script runs before the URL has been set - but I’m not sure.

Any ideas please?

This topic was automatically closed after 70 days. New replies are no longer allowed.