Cloudflare is blocking the tripadvisor widget and i need to create a rule

Hi everyone, we found out that Cloudflare was blocking our tripadvisor widget. I need to create a rule to let Cloudflare to display properly the widget, but i think i don’t do it properly.

This is the widget code we use:

<div id="TA_cdsratingsonlynarrow592" class="TA_cdsratingsonlynarrow"><ul id="7WtDmv5qQGi" class="TA_links 6KmNLss7j3M"><li id="3xLiG5y" class="9uX577Go"><a target="_blank" href=""><img src="" alt="TripAdvisor"/></a></li></ul></div><script async src=";uniq=592&amp;locationId=3186766&amp;lang=en_US&amp;border=true&amp;display_version=2" data-loadtrk onload="this.loadtrk=true"></script>

Thanks for helping!

My best guess is the conflict with the Rocket Loader since it’s calling the script? :thinking:

May I ask have you tried disabling the Rocket Loader? Does it work then? :thinking:

There is a way to either disable it for the whole domain and other proxied DNS hostnames, or keeping it enabled but disable it for some particular /path/ via Page Rule.

Nevertheless, we can disable it for loading over a particular JS script.
In your case, if you want to exclude executing the Rocket Loader on Statcounter script/plugin, add the data-cfasync='false' attribute at your script tag before the src attribute as the instructions suggest from the article below.

The end result with modified code would look like below:

<div id="TA_cdsratingsonlynarrow592" class="TA_cdsratingsonlynarrow">
  <ul id="7WtDmv5qQGi" class="TA_links 6KmNLss7j3M">
    <li id="3xLiG5y" class="9uX577Go">
      <a target="_blank" href="">
        <img src="" alt="TripAdvisor" />
<script data-cfasync='false' async src=";uniq=592&amp;locationId=3186766&amp;lang=en_US&amp;border=true&amp;display_version=2" data-loadtrk onload="this.loadtrk=true"></script>

Helpful article:

1 Like

Hi, thank you for your help.

Yes by deactivated Rocket loader, the tripadvisor widget load correctly. However i am not exactly sure where to add the script you shared above.
Is it a Page Rule?



How does the widget code work? Is it being generated/inline added via some other JS code, or embeded by copy-paste?

Actually your code above worked, after clearing cache the widget appeared correctly with the Rocket loader on.

Thank you very much!


I am happy to assist you :wink:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.