Tutorials › How to set up Google Analytics

How to set up Google Analytics

Updated 4 years ago

Overview

Step-by-step instructions for creating and adding Google Analytics in WordPress.

Steps

I. Create your Google Analytics account

  1. Go to https://analytics.google.com/
  2. Switch to your business Google Account by clicking your profile in the top right-hand corner
  3. Click Admin in the bottom left-hand corner
  4. Click + Create Account
  5. Enter the name of your business, e.g. “WP Sofia”
  6. Click Next
  7. Select Web
  8. Click Next
  9. Enter the name of your website, e.g. “WP Sofia Production”
  10. Enter your Website URL
  11. Select https:// (only if you have configured your website to work with HTTPS)
  12. Select Industry Category
  13. Select your Reporting Time Zone
  14. Click Create
  15. Accept the Terms of Service Agreement

II. Add Google Analytics to WordPress

  1. Go to the Admin section for your newly created Google Analytics account
  2. Click Tracking Code under Tracking Info of the Property you created earlier
  3. Copy the Global Site Tag (gtag.js) code
  4. Open your WordPress website
  5. Click Customise in the top toolbar
  6. Click Code
  7. Click Head Code
  8. Paste your gtag.js code into the field
  9. Click Publish

III. Test that Google Analytics is working

  1. Open your WordPress website
  2. Open Google Analytics
  3. Click Realtime
  4. Click Overview
  5. Wait a few seconds and you should appear as a visitor on your website
  6. Browse around your WordPress website and watch the realtime Google Analytics view update (there may be a few seconds delay)
  7. Congratulations! You’ve successfully configured Google Analytics for your WordPress website.