Site logo

Archived topic

Google Analytics tracking code

10 replies · Started by Anonymous on September 19, 2014

Viewing posts 1–11 of 11

Hi, I want to use Google Analytics with my GeneratePress site. Where is the best place for me to put the Google Analytics tracking code? As a header or footer element somewhere? Should I edit a file directly?

Perfect, thanks!

You're welcome!

Tom,

For the Google Analytics tracking code, it is not better to put it in the before_Header area of the GP Hooks addon.

I think I read it is better to put it just right after the body tag.

Oups. Just read to put it before the </head> tag.

Ah, they do actually suggest you put it before the </head> tag.

I'm not sure how much it matters, but if that's the case, the code can go in the wp_head area of the Hooks.

Hello

Regarding that topic, once I pasted the GA code, should I also click the PHP box?

Thanks
Laia

Only if you've added PHP in there.

If it's just the GA code, then checking the PHP box isn't necessary :)

I bought premium but I don't find where I get the GP Hooks addon option?

This archived topic is closed to new replies.