Google Analytics Tag Question

Started by delta5, September 24, 2019, 04:29:44 PM

Previous topic - Next topic

delta5

Hi guys,
I started a Google ad campaign for my forum. Google Analytics needs me to install a code snippet. What file would I add that to to work correctly?

Mick.

That would be in the index.template.php of whatever theme you're using.

Find:

</head>


Add your code just before

drewactual

install it on index.template for the theme you're using.. put it right above the </html> (closing html) tag and below the </body> (closing body) tag.  make sure and comment out the ' by using backward leaning slash.. i.e.:


<script> 'blahblah' 'blah' </script>


should be commented so it doesn't wreck your php like:

<script> \'blahblah\' \'blah\' </script>



as Mick said it CAN go in the head, but... it will have to be processed before rendering the site, where as when it's at the foot and 'under the fold' it doesn't.  either will work.

delta5


delta5

Inside the forum admin section, it breaks up that template into several sections by line number. Where would the best place to put it be? In the last section at the bottom?

Illori

we dont recommend using the editor in the admin panel. you should download the file and modify it and upload it back to your server.

delta5

ok, thanks. Now to find that file lol

Advertisement: