Skip to:
Content
Pages
Categories
Search
Top
Bottom

Google Analytics


  • blastblast
    Participant

    @blastblast

    I’m trying to link my Google Analytics straight into my Buddpress/bbpress site without a plugin.

    Regarding the Google Analytics code – It says to paste it onto every page I wish to track however I also read that it could also be done by simply placing the code in my header.php. Is this true?

    If so, in that case, I am running a child theme and have the header.php in my child’s theme already. Should I paste the Google analytics code in the header.php of my child theme or into the regular header.php?

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

  • Henry Wright
    Moderator

    @henrywright

    I’d paste it into your theme’s footer.php file immediately before </body>


    blastblast
    Participant

    @blastblast

    hey @henrywright,

    Why do you suggest the footer as opposed to the header? What is the difference?

    I also have the footer.php in my child theme folder. I removed the “Powered by WordPress” footer so currently there is no text as my footer if that makes a difference at all.

    Thanks


    Henry Wright
    Moderator

    @henrywright

    It’s better to have the Google Analytics code run after all of your page elements have loaded. This way, the page will load faster for your users as it doesn’t have to wait for the analytics code to execute. You’re not talking much – perhaps a fraction of a second. So if you want to put it in your theme’s header.php then go for it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Google Analytics’ is closed to new replies.
Skip to toolbar