Skip to main content
Call us
Phone numbers and hours
Help Center

Explore our online help resources

Help

WordPress Help

Add Google Analytics to WordPress

You can track your WordPress site in Google analytics by adding the tracking code to the header of your WordPress theme.

Note: You must have a Google Analytics account before you can set up this plugin. If you don't have an account, then you will need to set one up.

  1. Access your Google Analytics account and copy your tracking code snippit.
  2. Access your WordPress files via hosting or FTP. (cPanel / Plesk / Managed WordPress)
  3. Navigate to the /wp-content/themes folder for your WordPress site.
  4. Open the folder for the theme you are currently using on your site.
  5. Open and edit the header.php file.

    If your theme does not have a file named header.php, then you will need to locate and edit the file that contains the wp_head() code.

  6. Paste your tracking code snippit just before the following code.
    <?php wp_head();
  7. Save and upload the updated file.
  8. Visit your site so that traffic is recorded in your Google Analytics account.
  9. Check your Google Analytics reporting to confirm the file was correctly updated.

More info

Community Related

karie2005's Avatar
Getting fatal error when accessing dashboard

2 Replies

Last posted over 4 years ago.

anat1's Avatar
Cannot verify Google Analytics on my site

1 Replies

Last posted 11 months ago.

kyd's Avatar
I can't find app-ads.text

3 Replies

Last posted 11 months ago.

platynoweszpara's Avatar
Website down after installing latest updates

1 Replies

Last posted over 4 years ago.

Don't see what you are looking for? Search the Community