More in this section

Forums / General Discussions / Google code prior to closing body tag

Google code prior to closing body tag

2 posts, 0 answered
  1. Steve
    Steve avatar
    1 posts
    08 Aug 2012
    18 Nov 2013
    Link to this post
    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!
  2. Vassil Vassilev
     Vassil Vassilev avatar
    308 posts
    21 Jan 2015
    20 Nov 2013
    Link to this post
    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 -->

    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.

    Vassil Vassilev
    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
2 posts, 0 answered