Javascript not working in body field. Using Full HTML I have created a basic page. Inserted the following tripAdvisor your rating widget code in that which contains some javascript. Used Full HTML formatting. But instead of displaying the rating widget it's just displaying the TripAdvisor logo. How can we insert javascript in body? 

&lt;div id="TA_cdsratingsonlywide929" class="TA_cdsratingsonlywide"&gt;&lt;ul id="4tBLqbUxyNxV" class="TA_links b9a34Zb66"&gt;&lt;li id="UjhOoNfy" class="GDLP2q"&gt;&lt;a target="_blank" href="https://www.tripadvisor.com/"&gt;&lt;img src="https://www.tripadvisor.com/img/cdsi/img2/branding/tripadvisor_logo_transp_340x80-18034-2.png" alt="TripAdvisor"/&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;script async src="https://www.jscache.com/wejs?wtype=cdsratingsonlywide&amp;amp;uniq=929&amp;amp;locationId=8678313&amp;amp;lang=en_US&amp;amp;border=true&amp;amp;backgroundColor=gray&amp;amp;display_version=2" data-loadtrk onload="this.loadtrk=true"&gt;&lt;/script&gt;


Edit:
I have tested the same code on another Drupal 8 Website and it's working without any issue in that. 

The site on which the code is not working was upgraded to Drupal 8 from Drupal 7 and it's also configured on cloudflare. I tried to put cloudflare on development mode and also disabled the AdvAgg module but thats still not working.

Is there any settings in Drupal 8 which can disable javascripts scripts in Body field?
Most likely , your FULL HTML content authoring text format settings are limiting the markup you can use, stripping out the script (that's default behavior).

You can either:
1. Modify the settings for the text format to not restrict markup
2. Create a new text format, without any of the filter options enabled; then switch the format on the body field in which you want to insert the script. 

If these options still fail, you may have a theme where a preprocess hook or twig filter is stripping out the script.