+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Google analytics

Google analytics

2 posts, 0 answered
  1. Devin
    Devin avatar
    149 posts
    Registered:
    09 Jun 2009
    03 Nov 2010
    Link to this post
    Hi I have a Content Place Holder with some Google analytics code in the header of a masterpage.  I'd like to place this just above the </head> tag.  The problem is that Sitefinity is adding a meta tag and some CSS links below my Content Place Holder.  Can you please help?

    Thanks!
    Devin
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    03 Nov 2010
    Link to this post
    Hello Devin,

    The head tag of a Sitefinity page contains standard attributes related to the meta data, css scripts, embedded resources. These are standard HTML attributes. You can modify the way that controls are added to the Head by overriding AddHeaderControls method of InternalPage class. You should create a custom class that inherits from InternalPage and then set your custom page inside Sitefinity/cmsentrypoint.aspx

    <%@ Page Inherits="InternalPageCustom" MasterPageFile="~/Sitefinity/Dummy.master" %>

    The Google Analytics code should be added before the closing </body> tag.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about 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