Setting up Google Analytics in WordPress Elementor

What is Google Analytics & Why Use it?

Google Analytics is a web analytics service that provides statistics and basic analytical tools for search engine optimization (SEO) and marketing purposes. The service is part of the Google Marketing Platform and is available for free to anyone with a Google account.

1. Create a Google Analytics Account

Go to https://google.com/analytics. This will take you to the google marketing page where you can either create a new account or sign into an existing account.

To create an account, click GET STARTED TODAY. If you already have an account and want to link another website to Google Analytics, click on SIGN INTO ANALYTICS. You will then be directed to https://analytics.google.com

2. Set up Google Analytics

Go to Admin at the bottom left of your screen (where you see the cog wheel) and CREATE ACCOUNT.

Fill in the Account Name e.g. Name of your Website. In my case, I filled it with eTraffic. Click on NEXT

Fill in the Property Name (again, use the name of your website). Change the timezone that is appropriate to you. Click on NEXT.

Fill in your business details: type, size and tick all the boxes that relates to what you want analytics to do on your website. Click CREATE. Agree to the Terms and do not forget to change the country at the top in the dropdown.

3. Set up Data Stream

This generates the code or “tag” necessary for Google Analytics to read your website. It is inserted into your website so that Google Analytics can fetch the data. Choose WEB.

Enter website URL and Name. Click on CREATE STREAM.

Go to Tagging Instructions then Global Site Tag. Copy the code in the box – you can use the copy icon to give you a clean copy.

4. Insert code into your Website

There are several ways you can do this.

  • If you have WordPress and use Elementor Free version, you will need to paste the code into the <head> section of every page:

Open a page of your website with Elementor. Find the HTML widget and drag it into the top of your page. Paste the code into the field available.

  • If you have WordPress and don’t have Elementor installed, you can download a plugin where you can enter the code. Go to Plugins in WordPress backend of your website. Find and install “Monster Insights”. Launch the plugin and follow the steps. You can’t go wrong.
  • If you have WordPress and use Elementor Pro, you can paste the code into one place which then reads the whole site:

Go to Elementor “Custom Code” in the WordPress backend dashboard of your website. Click on ADD NEW CUSTOM CODE.

Enter a title e.g. Google Analytics. Make sure the dropdown shows <head>. Google will fetch the data much quicker if it is in the <head>. Paste the copied code into the field below. Click on Publish.

Save and Close (display on entire site)

5. Test if analytics is working

Open a new window in Google Chrome incognito (CTRL + Shift + N) and go to your website that you just pasted the code from and open it. Leave it open in this window and return to Google Analytics. Go to Reports > Realtime. You should now start to see some movement on the charts coming from your website being open in Chrome incognito. Because your website is open in incognito mode, Google Analytics treats this as an external visit i.e. not from you so it should show up as new data.

6. Troubleshooting

If there is no movement in the Google Analytics page, give it a little time and if there is still no movement, here is a link to help with troubleshooting: https://holini.com/google-analytics-isnt-working/

7. Resources & Links

Set up Analytics 

Validating your Google Analytics 

Google Tag Manager

Scroll to Top