Q and A: How do I add Google Analytics code to my WordPress site?

QuestionHello Kalena

I have a couple of questions about my WordPress site.

I have signed up for a Google AdSense and Google Analytics account but I am confused as to where to place the tracking codes.

Can you help me at all?

Thanks
Sarah

Hi Sarah

I recommend you review Google’s own instructions for adding the Google Analytics code.

If you’re adding the code to a WordPress site, you need to add it to the header.php file from within WordPress. You go to the *Editor* area under Administration from your WordPress dashboard. Then you copy and paste the code into the header.php page, just before the closing </head> tag.

Google also provides instructions for adding the AdSense code. However, if you want to put AdSense on your WordPress site and you’re not confident editing code, you’re probably better off installing an AdSense plugin that will help you to add AdSense ads to your pages without messing around with code hacking.

Hope this helps

Kalena

———————————————–

Struggling to get better search rankings? Download our Free SEO Lesson. No catch!

Share this post with others