Google code prior to closing body tag

Posted by Community Admin on 03-Aug-2018 15:54

Google code prior to closing body tag

All Replies

Posted by Community Admin on 18-Nov-2013 00:00

I have Google code for Remarketing ads I need to add to several pages of our site near the closing body tag.  The code consists of one javascript, one link to an external javascript and <noscript> entry for those who have javascript turned off.  I am able to add the majority of the code with the use of the javascript widget, however I cannot successfully ad the <noscript> content so it is included at the end of the javascript widget entries.

Anyone have suggestions on how I can accomplish this?  Thanks!

Posted by Community Admin on 20-Nov-2013 00:00

Hello Steve,


True, Sitefintiy has a special widget where you can directly write javascript that needs to be outputted - the JavaScript widget located int he Scripts and Styles section of the toolbox.

You can proceed in the following manner:
1. Drop a ContentBlock on your page
2. In its HTML paste:

<!-- Google Tag Manager -->
<noscript>......</noscript>

3. Drop a JavaScript widget right after the ContentBlock widget
4. Select the script to be included "Where the widget is placed"
5. In the Write JavaScript tab paste your javascript:

This should deliver the same HTML output as desired by Google.

Option 2 would be to paste the desired HTML in a masterpage and use this masterpage as base for this page's template.

I hope you find the above information useful.

Regards,
Vassil Vassilev
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed