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

Forums / General Discussions / Installing a tracking code site-wide

Installing a tracking code site-wide

4 posts, 0 answered
  1. John
    John avatar
    7 posts
    Registered:
    15 Sep 2011
    15 Sep 2011
    Link to this post
    Hi,

    I need to install a bit of javascript tracking code before the </body> of each page of my website.
    Is there an easy way to do this?

    My first inclination is to to edit each of my master pages to include the bit of javascript and then replace the current .master files with the new ones. Would this be the simplest way to accomplish this task?

    Also, can I edit the .master pages in and make these changes in notepad/dreamweaver, or will I need to use visual studios? 

    Thanks,

    John
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    15 Sep 2011
    Link to this post
    You can use the Javascript Widget to do this

    So open your template in the backend, and plop in the JS Widget (I believe under scripts and styles), put in your script code...and there's a COOL COOL option to PICK where it renders in the final page (so choose bottom)

    Good to go!
  3. John
    John avatar
    7 posts
    Registered:
    15 Sep 2011
    15 Sep 2011
    Link to this post
    Thanks Steve! Is the javascript widget available in Sitefinity 3.7.2136.2:1? That is the version that I am using.
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    15 Sep 2011
    Link to this post
    Oooooh, this is the 4.0 forumns...

    However I did at one point re-create this control into 3.x :)

    I can't remember if I have your version or not included in the .zip, but if not you could always do some assembly binding

    It should let you write freeform script or include multiple scripts and it'll render them where you want automatically.

    LINK
    (It's in the Random Site Controls assembly)
4 posts, 0 answered