Google Tag Manager in Divi

Google Tag Manager in Divi

In this tutorial we’ll be going over switching out your Google Analytics code on your Divi site with Google Tag Manager (GTM). Through GTM you can now replace hard-coded tags directly on your site to help reduces errors in case you have to edit code on a production environment or if you have to hire a developer or webdesigner to make or test these small changes.

On Google Tag Manager

To get a Google Tag Manager you first need to go to the site here. Note If you already have a Google Account make sure you’re signed in or if you don’t have an account with Google create one first.

Once you’re signed you’ll need to add a new account, you can follow the instructions on the screen to set up your specific account name, container name and then retrience you code. Side Note: The container just represents the code snippet used in web development that removes the need for multiple data tracking codes being placed directly on the site. 

Quick Jump to Divi

Add you recently acquired GTM code to your divi site by going to:

Divi // Theme Options // Integrations

Quick Jump back to GTM

Let’s now get GTM set up now with Google Analytics. Back on your GTM dashboard select new. Once on the new window you’ll want to name your tag something obvious, like oh…let see… how about Google Analytics!

Select the Universal Analytics Tag Type

Under Google Analytics Settings, click the drop down menu and select New Variable. My image might look slightly different but that’s only because I’ve already done the following setp

Under tracking ID insert you Google Analytics ID. You may need to make a quick jump over to Google Analytics to to copy and paste the code inside.

Expand Advanced settings. Under Tag Firing options select Once Per Page.

Set a Trigger

Your final step will be to click the trigger box and select All Pages.  Once this is done you’ll be able to save and you’re Google Analytics code will now work through GTM. You can also test to see if the Analytics code is firing once per page in the Preview section of the dashboard.

Add Google Analytics to Divi

Add Google Analytics to Divi

Follow these steps to grab a Google Analytics (GA) tracking code and implement it successfully on your Divi website theme. For those that would rather follow along with a video you can catch the same instruction on my youtube channel.

 

On Google Analytics

To get a Google Analytics code you first need to go to the site here. Note If you already have a Google Account make sure you’re signed in or if you don’t have an account with Google create one first.

Once you’re signed in to Google go to the Google Analytics Admin account you can sign up for a new account. Clicking on the drop down menu should reveal the new account link. Fill in your Account Name, Website Name, Website URL, and select an Industry Category and Reporting Time Zone.

New Account

Under the Data Sharing Options, check the boxes next to the options that you want, then click Get Tracking ID.

Gimme My Code

Under Now that you have a new account set up you should be able to go under the property information, make sure that your account is highlighted and select Tracking Code.

Copy your tracking code, Ctrl+C

Now to Divi

With your recently copied tracking code head over to your Divi site going to Divi>Theme Options > Integrations. There you’ll find the section that mentions Google Analytics, here is where you can paste your code! Ctrl + P

Send a message

Have a though or question, feel free to ask away.