Installing a tracking code site-wide

Posted by Community Admin on 03-Aug-2018 17:48

Installing a tracking code site-wide

All Replies

Posted by Community Admin on 15-Sep-2011 00:00

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

Posted by Community Admin on 15-Sep-2011 00:00

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!

Posted by Community Admin on 15-Sep-2011 00:00

Thanks Steve! Is the javascript widget available in Sitefinity 3.7.2136.2:1? That is the version that I am using.

Posted by Community Admin on 15-Sep-2011 00:00

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)

This thread is closed