Everytime I add the tacking code to the source code on the websiet, EE strip it out. Is there anyway to get it to stay without using a plugin?

  • I should also mention that I am not seeing a way to access the HTML where I am supposed to place the codes in the header and body. I noticed you mentioned you add to the footer? That is not the instructions Tag Manger is giving me.
    – Sara
    Commented Jan 23, 2017 at 17:31

2 Answers 2


Just to echo Johnathan's answer, I put my Google Analytics tracking code in a Global Variable (usually called footer) which is added to each template.


Put it in the template as opposed to in a field type. If you need to be able to change the number, just make that a field instead. Just put this in the template and replace {yourfieldhere}

  var _gaq=[['_setAccount','{yourfieldhere}'],['_trackPageview']];
  setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);
  (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.