• Where shall I paste a HTML code for Google Anatlytics? Instruction says to
    paste it onto every page you want to track immediately before the closing </head> tag, but I can’t see this tag. All mine pages start with <script>. Sorry if question seems silly, I’m just starting.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You should have a file called ‘header.php’ – insert the code in there, inside the <script> tags, just before the </head> tag.

    You can use this plugin Google Analytics and add your UA no in plugin

    Thread Starter beakwi

    (@beakwi)

    Do I really need special plugin? It seems to be easier just to paste the code?

    Do I really need special plugin?

    It’s up to you really. I used to paste the code in all the time. But a year down the road I would switch themes, and forget.

    Also, depending on the theme you are using, you would want to make a child theme rather than edit your theme directly. If the only thing you are changing is the analytics code, making a child theme might be a bit of a pain unless you plan to make further edits.

    http://vudu.me/child has some info about child themes, and their importance, since you are just starting out

    I just go with a plugin now. http://wordpress.org/extend/plugins/google-analytics-for-wordpress/ is my favourite, as I trust the developer.

    Also, depending on the theme you are using, you would want to make a child theme rather than edit your theme directly.

    This is a good point – since I use a custom theme I always assume that others do to.

    I don’t have a plugin for it, but I did add a metabox for it to the ‘Settings -> General’ page – I just find that it’s easier to keep track of it that way.

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

The topic ‘Google Analytics’ is closed to new replies.