There are too many Google Analytics Plugins for WordPress. If you’re using the Divi Theme, you can install Analytics without a plugin.

Add Google Analytics to the Divi Theme by pasting the code in <head> section of the Integration Page (navigate to Divi > Theme Options > Integration). The Analytics code will automatically be added to every page of your website and should start tracking immediately.

For detailed steps and help with troubleshooting, keep reading this post.

How To Install Google Analytics On Divi Without A Plugin

This process includes quick instructions on setting up a new Google Analytics Account. If you’re working with existing property and just need to know where to add the code, skip ahead to Step 7.

Add Google Analytics To Divi

Step 1: Go to the Google Analytics Site and Click “Sign in to Analytics”

Go to https://marketingplatform.google.com/about/analytics/ and log into your account on the next screen.

Step 2: Click “Set Up For Free” To Get Started

If you didn’t know, Google Analytics is free. Click this button to keep going.

Step 3: Enter Your Business Name & Click Next

Enter the name of your business. This could be the company name or the name of your site – whichever makes more sense to you. Generally, I keep the “sharing options” checked. And then click Next to continue with the setup process.

Step 4: Select “Web” For Your Website & Click Next

This tracking guide is only for websites. You’ll need a more advanced setup if you’re looking to track Apps.

Step 5: Fill Out Your Website Information

1. Enter the name of your site
2. Enter your full website URL (pay attention to http/https and www/non-www)
3. Select your Industry Category from the drop-down list
4. Select the country and time zone of the website (not necessarily your own)
5. Click create to create your Google Analytics Account

Step 6: Agree To The Google Terms Of Service Agreement

I shrunk them down to take up less space, but I believe accepting the TOS is required for creating your Google Analytics account.

Step 7: Copy Your Tracking Code From Google Analytics

Copy the Global Site Tag code from inside the box. This is what you’ll be pasting on your site, as it contains all of the tracking needed to pass data from your website into this Google Analytics Property. If you need to find this code in the future, go to Admin > Property > Tracking Info > Tracking Code.

Step 8: Paste Your Code Into The Divi Integration <head> Section & Save

Once logged into WordPress, go to Divi > Theme Options, click on Integration in the navigation, and then paste the Google Analytics code copied in Step 7 into the <head> field on the page. Click Save when done.

We want the code in the <head> as it’s higher up on the page and will be one of the first tracking codes to load, meaning your data will be more accurate. Technically the code can be added anywhere on the page, but it’s recommended to be in the <head>.

What If You Already Have Analytics Set Up

If you already have a Google Analytics account and are setting up a new account for a new site, follow these steps. Head to the Google Analytics Admin, Click Create Account (in the top left), and follow the steps above starting at step 3.

If you already have an existing Google Analytics Property and are moving the code on an existing site, go to Admin > Property > Tracking Info > Tracking Code. Copy this code and continue at Step 7 Above.

How To Check If Google Analytics Is Working

Now that you’ve added the code to the website, you can use the Realtime Reports in Google Analytics to see actual visitors on your site.

Inside Google Analytics, use the left navigation and click Realtime > Overview. Now open your website in a new window, and you should see a “hit” come across the page. If you click into the more detailed Realtime reports, such as location or content, you should be able to see your location and the page your viewing.

What If Google Analytics Isn’t Tracking

While the list of potential reasons that Google Analytics isn’t working correctly is quite long, with a straight-forward setup – as we have by manually adding the tracking code to the Divi Theme, it’s likely one of the following issues.

You have a caching plugin enabled: Simple fix, clear your cache. Each caching plugin handles things differently, but most have a button in the settings to manually clear your cache.

You have a cookie blocking plugin: If you’re using a tracking code blocking software, such as Ghostery – you’re blocking Google Analytics from tracking your interactions with the website. Try using another browser, or disabling the plugin.

Your IP Address Is Filtered: While IP Filters are recommended to keep your data clean if you set up the account using the instructions above – they wouldn’t have been added yet. So hopefully this isn’t the issue.

You Missed A Step In The Setup: Double check you clicked “Save,” you copied the full code from Google Analytics, and that you pasted the code into the <head> section of your site.

What’s Next

With Google Analytics on your Divi website, the next step is to set up tracking and start collecting valuable data. I recommend implementing event tracking to track key engagements and conversions on your website. And of course goal tracking will help you better understand the quality of your traffic on the conversion points of your site. Let me know if I missed anything, and if you have any questions. Thank you!