Tutorials › How to set up Google Analytics
How to set up Google Analytics
Overview
Step-by-step instructions for creating and adding Google Analytics in WordPress.
Steps
I. Create your Google Analytics account
- Go to https://analytics.google.com/
- Switch to your business Google Account by clicking your profile in the top right-hand corner
- Click Admin in the bottom left-hand corner
- Click + Create Account
- Enter the name of your business, e.g. “WP Sofia”
- Click Next
- Select Web
- Click Next
- Enter the name of your website, e.g. “WP Sofia Production”
- Enter your Website URL
- Select https:// (only if you have configured your website to work with HTTPS)
- Select Industry Category
- Select your Reporting Time Zone
- Click Create
- Accept the Terms of Service Agreement
II. Add Google Analytics to WordPress
- Go to the Admin section for your newly created Google Analytics account
- Click Tracking Code under Tracking Info of the Property you created earlier
- Copy the Global Site Tag (gtag.js) code
- Open your WordPress website
- Click Customise in the top toolbar
- Click Code
- Click Head Code
- Paste your gtag.js code into the field
- Click Publish
III. Test that Google Analytics is working
- Open your WordPress website
- Open Google Analytics
- Click Realtime
- Click Overview
- Wait a few seconds and you should appear as a visitor on your website
- Browse around your WordPress website and watch the realtime Google Analytics view update (there may be a few seconds delay)
- Congratulations! You’ve successfully configured Google Analytics for your WordPress website.