I try to take care of every detail for my clients so when they take control of their WordPress website it’s fully functioning. Unfortunately Google has recently put security measures in place making it difficult for me to log into my client’s Google account. Without access to their account I’m not able to install Google Analytics’ tracking code in their WordPress site.
Here are the very same instructions I created for my client so she can set up a new account, and install her Google Analytics’ tracking code. You can use them, too, if you ever need to install Google Analytics on your WordPress website.
NOTE: If you’re installing Google Analytics for the first time, you’ll need a Google account to be able to log into Google Analytics. If you have Gmail, AdWords, and/or Google+ you already have a Google Account, but that does not mean you automatically have a Google Analytics account. You still need to sign up for Analytics.
Sign In and Get Your Google Analytics Tracking Code for Your WordPress Website
For a brand new website that has a new URL you’ll need a new tracking code.
- Go to http://www.google.com/analytics/
- Sign into your Google Analytics account
- Click Access Google Analytics
- Click Admin (at the very top — it’s in blue type)
- If you’re adding another website to your Analytics, click the window under ACCOUNT that has your account name on it, to open up the drop down menu
- Click Create new account
- Choose Track a Website
- Fill in the rest of the information
- Click Get Tracking ID (see below)
- Select and copy every bit of the tracking ID code including <script> and </script>
Where Your Tacking Code is Located
- Go to Admin
- Under PROPERTY —> click on Tracking Info to open up the window
- Click Tracking Code
Where to Paste Your Tracking Code
WordPress uses a common header and footer file for each of its pages so that means you’ll only need to install your tracking code in one place for Google Analytics to track all the pages on your site.
If you have the Genesis Framework and a StudioPress theme like me and my client, follow these instructions to install your tracking code:
- Go to your WordPress dashboard —> Genesis —> Themes
- Scroll down to Header and Footer Scripts and paste your text in the wp_head() box
- Save your changes
If you don’t have Genesis you’ll have to get into the really scary part of your site.
- Go to your WordPress dashboard —> Appearance —> Editor
- On the right hand side of your page look for the words Header (header.php) and click on it
- Paste your Google Analytics tracking code just before the </head> tag (see below)
- Click Update File
Leave a Reply