How to add Shopify google analytics and Google Tag Manager?

To create advertising and monitor your e-commerce it will be essential to track the events that happen within your pages. If you don’t know the programming language you will need Shopify google analytics to simplify the management.

Shopify google analytics

 Shopify life for $1/month

For this, you can use Google Analytics which allows you to accumulate a lot of data, always for free.
Yes, I know it, but how do I use it on Shopify?

Log into Google Analytics and create an account if you don’t have it.

Here, too, the main page opens where you will have to enter some data and choose between some options and click on “next”.
At this time you will need to create a Google Analytics property, but be careful, we are also interested in creating a Universal Analytics property so click on advanced and activate:

Why should I also activate Universal Analytics?

Because you will have to take advantage of Shopify google analytics enhanced e-commerce features and this would not be possible without Universal Analytics.

Now enter the name and be careful to set all the details, then enter the URL of your site.
By clicking on next you will be asked other questions and click on create.

Now that you have created the Google Analytics profile linked to your site account, the dashboard will open from which you can check all the analyses related to your e-commerce.

If you have multiple Shopify accounts you will need to make a link for each profile.

Now, what I advise you to do is play with it a little to understand each voice well.
But now I’ll show you a fundamental passage:

Now click on administrator, go to the right in the “view” section and click on “e-commerce settings”:

By opening it you will have to enable both e-commerce and advanced e-commerce and save, with just one click, it’s very simple.

Now you will need to get the tracking code found at: admin> tracking info> tracking code (yellow rectangle in the screenshot above).

Copy that code that we are now going to insert on Shopify> online store> preferences.

Now here you can paste the code you just copied:

Click on Save at the top right and activate the flag on “use advanced e-commerce” and save once again.
The native integration between Shopify and Google Analytics is now active.

From this moment you will begin to accumulate a lot of data that will be super useful for analyzing and improving the performance of your e-commerce.

What exactly will you see?

In the Google Analytics dashboard, you will see your conversion rate, revenue, average cart, number of transactions, the results of your affiliate codes, a lot of stuff!

But the really useful thing is that you will be able to see the bottlenecks. So those steps where you are losing revenue.
You can then act as a surgeon at that point to improve the performance of your e-commerce.

If you have opened now I advise you not to give it too much weight, after about a few thousand visits and a dozen transactions then your data will be statistically useful.

Do you have a project in mind

Google Tag Manager

So, as a first step, you will need to create a Google Tag Manager account and then you will go and install it within Shopify.

This tool is used to manage all your codes (monitoring, analysis and advertising) in a centralized and simplified way.

As a first step, create a Google account and create a Tag Manager account if you haven’t already activated it.
Once you are logged in, start entering your account setup data.

Clicking on create you will open the dashboard with a first instruction: install this code on your site.

Don’t panic.

The code is divided into 2 parts, as you can see from the image.

Now you will need to copy part 1 and paste it into Shopify: click on online store> themes> in active themes> actions> edit code.

If you don’t know the code language don’t worry, I’ll try to be as clear as possible.
Click on “theme.liquid” inside Layout (look at the arrow in the screenshot), you have to insert the first part of the code inside the “head” section.

How to do?

Search for “head” and insert it before closing, this means that you will have to paste the first part of the code before the word “/ head”:

Now go back to Tag Manager and copy the second piece of code.
Go back to Shopify one more time to paste this second code, but this time in the “body” section:

Exactly as before, search for the word “/ body” and paste the second part of the code into it.
Now click on save.

What should I do now?

Now you will need to check if what you entered works.

Then go to your shop and with the Google Chrome extension “ Google Tag Assistant ” you can see if there is a tag manager on your site.
If you see that it is present, check that the code matches your profile.

Is everything good?

Ok, let’s proceed.

Now that you have the tag manager installed within Shopify, you can create a tag.

The guys from A-Commerce will soon launch a free app that will allow you to install a one-click tag manager. It’s called “A-Tag” and you’ll find it directly in the Shopify Marketplace.

Now let’s move on.
For example, one of the most used tags is to communicate to Facebook when your user stays on your web pages. For some time, thus triggering an event, which Facebook will use to retarget through a very precise ad.

You can really choose many tags or create one by choosing ” Custom HTML “, just copy and paste the code you are interested in integrating into Shopify.

Once you have created the tag you will have to tell the tag manager when to activate it exactly. You will then have to choose an activator that activates the tag of the event. Choose the one that suits you best but I still recommend you try them all.

By choosing for example “timer” you are telling the tag manager to create an event every certain time, which you decide. Save.

Shopify life for $1/month

Also, remember to click on “submit” at the top right to make your tags effective.

Ok, but what if I just wanted to monitor my users’ behavior, without triggering events?

Conclusion

I hope, now you know how to add Shopify google analytics and Google Tag Manager. If you have any questions, you can be asked us by comment.

Let's Discuss Your Project

Categories

Our Development Process

Process We Follow