• Resolved mkpoway

    (@mkpoway)


    Hi all,

    I’m wondering which file I should paste my Google analytics code into. I’ve been pasting it into the Main Index Template (index.php), before the first <?php tag, but perhaps it should go somewhere else?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • as long as it comes before the </head> line you should be okay…

    My suggestion would be to use a widget (my personal favorite is Google Analyticator… https://ronaldheft.com/code/analyticator/) it will be seamless and add a quick-view to your admin dashboard.

    In general using plugin’s are a good way to go about getting the things you want done while you wrap your head around how to use PHP.

    good luck ??

    as long as it comes before the </head> line you should be okay…

    Huh? The analytics code is best placed in footer.php – just before the </body></html> tags.

    Oh I see. Because in the footer the site can begin to render before it’s all loaded.

    Thanks ??

    Thread Starter mkpoway

    (@mkpoway)

    Thanks, got it!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where should I paste the Google analytics code?’ is closed to new replies.