If you’ve logged into Google Tag Manager recently, you might have seen this message, “Your tagging server is out of date…”. Or even worse, “Your tagging server is out of date and no-longer supported”.

An anxiety-inducing experience for sure!

I’ve been setting up GTM server for clients for years and this is this is the first time I’ve seen a message like this.

Why is this happening?

I’m not entirely sure, but I have noticed quite a few changes in both Google Tag Manager and GTM server-side recently. The biggest ones are to do with server-side data transformations and GA4 demographic data now available when working with GTM server.

If you don’t know what these are, don’t worry, your GTM server should keep running for the foreseeable future, but you might be missing important benefits if you don’t upgrade.

The fix is fairly simple – simply update your GTM server.

If you’re somewhat familiar with Google Cloud Platform, you shouldn’t have too much trouble working through these steps:

Need help?

Feel free to schedule a free 20-minute call to discuss your tracking & analytics needs.

Common question I get asked a lot by Media Buyers, by people that are responsible for driving results for their business with paid media is why do my Facebook ads results and my CRM and my shopping cart all tell different stories?

The numbers are all over the place!

There are a few reasons why that may be. It might be that your UTM parameters aren’t applied correctly. It might be that your tracking is broken between one site and the next or it might be the ad network itself is over reporting the benefit that they’re bringing to your business.

This is a common problem with networks like Facebook because they’re in the business of making money, obviously. And the more beneficial that they look to your business, the more money you’re gonna spend. And that drives profits for them.

You can’t trust their numbers.

They’ve got an incentive to lie to you.

You have to get your own data, clean data, reliable data.

You have to get all your revenue sales, lead data and also add cost data into an enterprise analytics package like Google Analytics, Piwik, Adobe Analytics, amplitude analytics.

These are all excellent analytics packages. Once all of that data’s in there, then you can start telling somewhat accurate stories about what actually happened in your marketing.

If I’m doing an analysis starting today, I see that a hundred sales came in. What caused those sales was that the ad cost from today, this is the first big mistake that most people make when they’re looking at the results.

They go, okay, I spent, several thousand dollars and a hundred results came in, great! Tomorrow I’m gonna do the same thing. And then the results are different. Now, the reason why that’s faulty is because the results that you’ve got coming in today were actually caused by multiple events that happened in the past.

For example, somebody may have first found out about you on a YouTube video. Then they may have bookmarked you, they might have seen a Facebook social media post, then they might have saw a Google ads link and clicked it. They might have ended up on your email autoresponder. And now, finally, months later, they’re coming back, and they’ve heard about you from a friend, and they remember the URL and they came straight to the page and now they’re buying.

So, it’s important to first understand most people have multiple touches with your brand, with your product over multiple weeks and months at the very least. And sometimes that sales cycle is a lot longer than you realize.

You can’t divide today’s results and revenue by today’s ad spend.

That’s nonsense.

It’s like comparing Apples with elephants, it’s not even apples with oranges.

Getting this concept of understanding historical events causing today’s results is really important.

You’ll see, if you look at your results in Google Analytics for example, if you look at the results that were caused by today’s ad spend, it’s generally very few… mostly zero for a lot of businesses.

It’s not until maybe seven or 14 days has gone by until you start seeing significant results.

The further back that you look in time the higher those results and also the model that you’re using to understand your data is important too.

It’s so important to understand this concept… understanding why that Facebook ads over there are telling you a different story from your CRM, which is telling you a different story from your shopping cart.

Really critical to get this concept to get a handle on your numbers.

Hopefully that was helpful.

Leave a comment, talk to you soon.

Universal Analytics (UA) will stop collecting data in July 2023 and accounts are scheduled to be deleted in Jan 2024.

In order make comparisons from year to the next, you’ll want at least 12-months of historical data before July 2023 comes around. You can’t import your UA data into Google Analytics 4, unfortunately. So, if you haven’t done so already, that means creating a GA4 property IMMEDIATELY.

This guide shows exactly how to upgrade to GA4 like a pro.

Contents

Tracking Blueprint

Imagine building a house.

Unless you want the project to run overtime, cost a fortune and have quality issues, you’ll want to follow a blueprint.

Similarly, when it comes to Analytics, starting with a Tracking Blueprint will pay dividends later.

Creating a Tracking Blueprint involves mapping out your business goals and KPIs, and then deciding which events and parameters you need to measure.

Also, study what’s already been done in your Universal Analytics to see to see what data is still relevant.

Setup Google Analytics 4

Create a GA4 Property

Once you have your Tracking Blueprint, it’s time to create a Google Analytics 4 property.

In your Universal Analytics account, click “Admin” button in the bottom left corner of the screen.

You’ll see a button to create your new GA4 property in “Property” column.

If you click the “Enable data collection using your existing global site tag(s)” checkbox, the system will populate events from the existing Universal Analytics setup. This will limit your ability to setup GA4 correctly. As such, we recommend leaving this box unchecked.

GA Measurement ID

Now, within the new GA4 property:

Go to Data Streams > Stream.

Copy the Measurement ID into a notepad. We’ll be using this later in this process.

With these basic steps completed, let’s look at a few other recommended settings that will greatly improve your analytics.

Enhanced Measurement

In the image above, you’ll notice Enhanced Measurement is enabled by default.

This is a new feature in GA4. It allows you automatically collect data on standard events such as scroll, click, view search results, video progress, and file downloads.

Cross-Domain Tracking

When a prospect visits your site for the first time, GA4 assigns them a unique client_id and stores the value as a 1st-party cookie.

1st-party cookies can be accessed by any subdomains that share the same root domain. Example – cookies created on https://your-site.com can be accessed by https://go.your-site.com.

client_id is extremely important for keeping track of all the activities a prospect does as they browse through your sites and pages.

If the site your prospect navigates to does not share the same root domain, GA4 has no way of accessing the client_id cookie. So, it sets a new one.

As a result, the system thinks the visitor as a different person altogether. It has no memory of what the visitor was doing on the previous site just seconds earlier.

That’s why, to see the customer journey across all of your interconnected sites, you need to setup cross-domain tracking.

Here’s how to do it:

Go to Data Streams > Stream > Configure Tag Settings > Configure your domains.

Image 2022-09-29 at 2.30.20 PM

Add a list of all your root domains (without https) and click “Save”.

Referral Exclusions

When multiple websites link to each other – main website, funnel system, and ecommerce store – they act as a single interconnected system.

Take the example of driving paid traffic to a funnel. At the end of the funnel is a link to your main site.

Normally, any visitors to the main site will look like they were referred by your funnel. Yet, the ad campaign should have received credit for the visit, not the funnel.

Unless Referral Exclusions are configured, you won’t see the original referrer information.

To get your analytics telling the right story, you need to configure Referral Exclusions.

With Universal Analytics, you had to manually configure Referral Exclusions.

With GA4, when you have Cross-Domain Tracking configured, the docs say Referral Exclusion should work too.

However, I like to be doubly sure by doing the following:

Go to Data Streams > Stream > Configure Tag Settings.

Click the “Show more” button to reveal more options, then click “List unwanted referrals”.

Enter the domains you want to exclude referrals from, then click “Save”.

Now referrals between the listed domains will be ignored, and the actual referral source will be shown in your analytics reports.

Data Retention

By default, GA4’s data retention for events associated with cookies, user IDs or advertising click IDs are set to 2 months.

You can extend this period up to 14 months.

Image 2022-09-29 at 2.15.12 PM

Go to Admin > Data Settings > Data Retention, click the drop down and select “14-months” then hit the “save” button.

Custom Events

If you’re using Google Tag Manager to deploy GA4 (strongly recommended), then you can create a custom event from your website with the following script:

<script>
  dataLayer.push({
    event: "some_custom_event"
  }); 
</script>

Custom Definitions

When sending parameters along with events to GA4, if they’re not already defined as dimensions, you’ll have to define them before you can access them in reporting. To do so:

Go to Configure > Custom definitions > Custom dimensions and click the “Create custom dimensions” button.

Two dimensions you should define right away is “content” and “term”. These correspond with utm_content and utm_term.

For some odd reason, the Google Analytics 4 team decided to leave these out of the default setup. Lots of people use these dimensions.

The system will need to have collected event data with dimension in order to be able to define it as a custom dimension.

Give the dimension an appropriate name, choose whether the scope is for an Event or for a User, select a parameter (that the system has already seen) from the dropdown and hit “Save”.

Custom Metrics

This is a similar process to custom definitions.

Go to Configure > Custom definitions > Custom metrics and click the “Create custom metrics” button.

Give the metric a name, choose whether the scope is for an Event or for a User, select a parameter (that the system has already seen) from the dropdown, choose the unit of measure, then hit “Save”.

Conversions

To run queries about specific conversions, you first need to mark certain events as being a conversion.

To do that is simple. Go to Conversions > Events. Then toggle the event as a conversion.

Now the event will show up as a conversion that you query in reporting.

You can define up to 30 conversions with GA4’s free tier.

Google Ads

Linking your Google Ads account allows you to see your ad costs and analyze CPA and ROAS in GA4 (powerful). Plus, you can create audiences from GA4 audiences and optimize for GA4 conversions in Google Ads.

Make sure you’re already logged into your Google Ads account, in a separate tab.

Go to Admin > Property > Google Ads links > Link

Click “Choose Google Ads accounts”, choose the account you want link, then click Confirm”.

Google Search Console

Linking Google Search Console provides information about the performance of organic-search traffic in GA4.

Make sure you’re already logged into Search Console, in a separate tab.

Go to Admin > Property > Search Console links and click the “Link” button.

Click “Choose accounts, choose the account to link, and click “Next”, then click “Confirm”.

Google BigQuery

There are some drawbacks to keeping your data in Google Analytics 4:

Data is oil and owning your own 1st-party data platform is like owning an oil rig.

The cost of running a BigQuery instance is nominal. Most small businesses will be lucky to break $5 per month and the costs for mid-market enterprise are normally modest.

In short, there’s no good reason not to store your data in BigQuery.

To create a BigQuery instance, you first need a Google Cloud Platform (GCP) account. New accounts get $300 free credit to be used over the first 90-days.

Once you’ve created a BigQuery instance, make sure you’re logged into GCP.

Next, go to Admin > Property > BigQuery and click the “Link” button.

Click “Choose a BigQuery project”, choose the proejct to link, and click “Next”, then click “Confirm”.

Debug Filter

When testing your setup with Google Tag Manager, it usually adds a query string at the end of the URL. For example – https://measurebit.com/?gtm_debug=1664426399801.

If you want to filter out these visits so they don’t show up in your digital analytics:

Go to Admin > Property > Data Settings > Data Filters > Create Filter

Choose whether you want to filter “Developer Traffic” or “Internal Traffic”.

In this case, we’ll choose “Developer Traffic”, exclude, and filter state “Testing” (to label the hit with a “test” parameter) or active (to exclude the traffic altogether).

Next, click “Create”.

That wraps up the most common GA4 configurations. Now, let’s cover how to deploy GA4 on your website.

 


 

Add GA4 Using Google Tag Manager

The best way to add Google Analytics 4 to your site is via Google Tag Manager. It gives you most freedom for collecting all the events and parameters you need while having fine-grained control over where tags fire.

If you’re not already using GTM, make sure you’re logged into gmail, then navigate to tagmanager.google.com and create a free account.

Create a GTM Web Container

Click the button with 3 little dots near the top right to reveal a dropdown menu, then click “Create Container”.

Best practice is to create both Web and Server containers and link them together for a robust server-side tracking setup. But you can do this in stages and add the server-side tracking at a later date.

Give your GTM container a name, choose the “Web” option, then click the “Create” button.

GA4 Configuration Tag

You need at least two GA4 tags… one for initial page load and one for any events you’re measuring.

Let’s set up the page load tag first.

Click “Tags” link.

Click “New” button.

Name the tag (e.g. “GA4”).

Click “Choose a tag type to begin setup…” link.

Choose “Google Analytics: GA4 Configuration” from the menu options.

Enter the GA4 Measurement ID into the box provided.

Click “Triggering” section and select “All Pages” option.

Then click “Save” button to save the tag setup.

The Data Layer

Next, we need another tag to send data to GA4 whenever something meaningful happens on a web page.

We’ll come back to creating this tag in just a moment. But first we have to create some kind of trigger to tell the tag to fire.

You can trigger tags upon just anything in GTM.

Wherever possible, we try to trigger tags with events rather than page views.

Why events?

An event can be clicking a link or button… scrolling down the page… browsing a page for longer than 30 seconds… filling out a form… making a purchase… basically, any meaningful interaction you can think of.

The advantage of using events is you can access a BUNCH of useful data to send to analytics, Google Ads, Facebook Ads, a database, or pretty much anywhere you choose.

The way to push data from your website is using what’s known as a dataLayer push.

Here’s a simple example of a script used to push data to GTM whenever a product detail page is viewed on an ecommerce site:

<script>
dataLayer.push({
  event: "generate_lead",
  conversion: {
    firstname: "John",
    lastname: "Doe",
    email: "[email protected]",
    phone: "+1-234-56789",
    value: 10,
    currency: "USD"
  }
});
</script>

This script creates an event named “generate_lead” and sends parameters such as name, email, phone, value, and currency along with the event. The amount of data you send depends on what you’re using it for.

In GTM preview mode, events appear in the left sidebar.

You can see the data that’s pushed into the dataLayer along with the event by clicking the “Data Layer” tab.

(Learn more about Google Tag Manager’s dataLayer, here.)

Create a Trigger

Navigate to the “Triggers” tab in the lefthand sidebar.

Click “New” to create a new trigger.

Give the event an appropriate name (e.g. Event – generate_lead), then click “Choose a trigger type to begin setup …”

Choose “Custom Event” from the menu options.

If we want this trigger to pick up the dataLayer.push example from earlier, we’d enter “generate_lead” for the event name.

Click “Save” button to save the new trigger.

GA4 Event Tag

Once again, we’ll create a new tag.

Give your tag a name (e.g. GA4 – generate_lead), choose “Google Analytics: GA4 Event” as the event type, enter the event name, parameters (if you’re passing this data to GA4), and the trigger that the tag is to fire upon.

Note – for privacy policy reasons, you can’t send PII (personally identifiable info) to Google Analytics.

Content Grouping

I often see Analytics setups where businesses use one analytics property or view for each and every domain.

The normally do this so they can view the traffic and conversions for each domain, separately.

But if those domains send traffic to each other, then the data should really be in the same property. That way, you’ll be able to see the entire customer journey across multiple sites.

GA4’s solution to this conundrum is to use Content Grouping.

Content groups enable you to categorize pages and screens into custom buckets so you can see metrics for related groups of information.

I’m not going to go into detail on how to it in this article. Here’s a GA4 knowledgebase article about Content Grouping in GA4.

Just realize it’s possible but requires some setup in Google Tag Manager.

Consent Management Considerations

So far, the focus of this article has been on moving from UA to GA4 and deploying using GTM.

However, ‘consent management’ is an area that’s growing increasingly important… most certainly if you do business in the European Union or California.

Where you store your data and what you do with it is becoming important.

We haven’t seen much in the way of court cases yet. But you can be sure that the powers that be are just itching to make examples of a few notable businesses.

Luckily, Google Tag Manager has built-in support for consent management. You can toggle tags to only fire if consent is given. That leads onto my next point…

How do you manage consent?

If you read the GDPR and CCPA fineprint, you’ll learn that simply firing a consent popup on your website is no-longer enough.

There are a number of established Consent Management Platforms who specialize in this area. Here are a few that I’ve stumbled upon during my data journeys:

Do your own research to see if a particular service properly satisfies the legel requirements in your jurisdiction.

Conclusion

With Universal Analytics going away in 9-months, now’s the time to migrate Google Analytics 4 properly.

Doing so will yield clarity about what’s working and what’s not in your digital marketing.

If want help setting up tracking for specific systems such as Shopify, Woocommerce, Samcart, Infusionsoft, Clickfunnels, Magento, Thrivecart, Bigcommerce, Squarespace, Typeform, Jotforms, Gravity Forms, Leadshook…

Or you want to see your ad costs, CRM data, revenue, and data from Stripe, NMI, Recurly together in GA4 so you can see accurate CPA, ROAS, and LTV for your marketing… we’ve got ton of experience with this.

You can schedule a free 20-minute call to discuss your project here

If you’re anything like the average business, your tracking is a ‘Hodge Podge’ of tags and pixels splattered all over the place… you’ve got error warnings in Facebook and Google Ads… and you have big blind spots in your marketing analytics.

The main reason this happening is from NOT having a Tracking Blueprint.

Without a plan, one team member does things one way, while another does things another way.

Imagine trying to construct a building without a Blueprint… the builder, plumber, electrician, and glaziers all doing their own thing.

Costly mistakes and delays would be inevitable!

That’s why they have to follow a Blueprint (with a competent project manager directing things).

In the same way, you need a Blueprint for your tracking, too… otherwise you’ll end up with mess.

So, in this article I share the steps to create a Tracking Blueprint for your business. Then I show how to implement and keep it up to date.

Let’s go!

How to Create a Tracking Blueprint

Imagine I have an Online Fitness business that sells fitness subscriptions.

For this example, we’re using a Free Trial to allow people to try out my service. Then, some of my users will upgrade to a paid monthly membership.

Where do we start?

First, we begin with a Big Picture of the business goals then drill down from there.

Here are the five steps involved:

  1. State your key business objectives
  2. Translate those into KPIs
  3. Identify the events linked with each KPI
  4. Find the parameters associated with each event
  5. Summarize in a Tracking Blueprint

Let’s go through each of these step in a little more detail…

1. Business Objectives

Ask, what are the main goals for your business?

I recommend discussing this with some of your organization’s key decision makers. They will likely give perspectives that you hadn’t thought of.

Examples of some some typical high-level business goals:

2. Key Performance Indicators

Once your main goals are clarified, we can turn them into measurable KPIs.

Take our “grow user-base” goal, for example. We can measure progress with the following KPIs:

We can also measure progress toward our “increase review” goal with these KPIs:

3. Events

The next step is turn your KPIs into a set of events that are worth tracking.

Using a pen and pad, list your KPIs in one column. Then in another column, list all the possible events for each KPI, and connect them with arrows.

4. Parameters

At this point, you’ll have a list of events you want to track.

Most businesses stop there… they track the events themselves and ignore the RICH data they could otherwise collect with those events.

(Example – when a new prospect sign’s up for a free trial, they typically give name, email, phone, address and so on.)

This is a HUGE mistake because you can use this data to improve both decisioning AND ad-optimization. Both affect your bottom line!

So in this step, we list all the useful parameters that might get with each event. Here’s how that might look:

5. Tracking Specification

The last step is to take all of this work and summarize it in a Tracking Blueprint.

Here’s what that looks like for our Online Fitness business:

(Make a copy of this tracking template, here.)

Implementation Plan

Once you have your plan, here are the 3 steps to execute:

  1. Get buy-in from key stakeholders
  2. Form an implementation team
  3. Keep it up-to-date

1. Stakeholder Buy-In

Bring together the various people who are likely affected by tracking changes. Here are some suggestions to start with:

Discuss the reasons you’ve created the Specification. Uncover potential friction from various stakeholders. Explore the benefits and risks of your plan. Then make any adjustments.

This is a crucial time to get buy-in and will make future implementation FAR smoother.

2. Implementation Team

You need at least one person with a solid coding background.

They should have an understanding of the analytics systems your business uses. They should also be well-rounded problem solvers.

Finally, they need to be competent when working with the platforms your business uses.

Some of systems we frequently integrate include Universal Analytics, Google Analytics 4, Facebook Ads / Facebook CAPI, Google ads / Google Enhanced Conversions, TikTok Events API, Shopify, Woocommerce, Clickfunnels, Go High Level, ThriveCart, SamCart, Typeform, LeadsHook, Hubspot, ActiveCampaign, Infusionsoft (Keap), and BigQuery.

 

The cost of breaking something can be massive. So make sure your team are following rigorous processes for testing and deploying tracking changes.

3. Keep it Up-to-Date

As your business evolves, you’ll add and remove different tracking assets.

Over time, it will become messy.

Like a bedroom, if you don’t tidy up, you start tripping over yourself.

So, when adding or removing KPIs, events, or parameters, you have to update your Tracking Blueprint!

Doing so will yield a tracking system that’s a breeze to maintain.

Conclusion

The Tracking Blueprint is an essential part of any marketing strategy. The time taken to develop this asset will repay itself many times over.

Not only will you save time and cost on implementation, you will save on maintenance too.

Need Help?

Schedule a brief free call to discuss your project.

I come across LOTS of businesses who still do not use server-side tracking… some generating $100M or more in revenue!

You know the old saying, ‘If it ain’t broke, don’t fix it’.

After all, why bother tying yourself up in knots when your current tracking is working just fine?

To answer why, we first need a little context…

GOALS

Marketers and business owners want two basic things when it comes to media buying:

  1. Know what to kill and what to scale
  2. Maximise prospect quality

Both goals begin with collecting data that’s as reliable and complete as possible.

Once you have good data, reporting becomes MUUUUUUCH more useful and ads deliver better qualified traffic.

Traditionally, to setup tracking, you’d paste the Google Analytics, Facebook, and Google Ads pixels into s page or website.

Up until recently, this worked fine. But then, iOS14 happened.

It was CHAOS.

Once iOS14 and Safari14 rolled out, we started noticing missing data. To make matters worse, other devices and browsers announced their plans to restrict ad-trackers, too.

So began the War on Tracking!

Then, the ad networks adapted…

Facebook was the first to respond with conversion API (CAPI). Google Ads released Enhanced Conversions. Now, Tiktok has Events API.

But, how is server-side tracking any better, you ask?

google tag manager browser and server-side tracking

That’s where this handy illustration comes in. It shows how ad networks (Facebook, Google, etc.) send traffic with tracking parameters attached to the URL. These parameters are then collected by tracking pixels, along with other data points (IP address, user agent, and so on).

The red arrows show visitors’ browsers connecting to the ad networks.

This style of tracking worked pretty well for a while. But, then, Big Tech started taking more than their fair share.

You see, Big Tech is in the business of data. The more they have, the more they can re-package and sell access to the data.

Naturally, because it’s highly profitable, they collect as much data as they can… even when they are not supposed to!

In short, Big Tech showed themselves to be untrustworthy.

To protect their users, device and browser platforms responded by increasingly blocking ad-trackers.

 

So, how is server-based tracking any different?

First, you have to realise with the all changes, NOT ALL data is being blocked.

Mostly, it’s data sent directly back to ad networks that’s being blocked.

But data sent to your own site and subdomains is completely fine (otherwise, the modern internet would break.) In other words, you send tracking data to tracking.yoursite.com without a problem.

From there, you can forward this data anywhere you choose (indicated by the blue arrows in the diagram). The best part is, data sent from a tracking server cannot be blocked.

NOTE – For this to work properly, server-side tracking MUST share the same root domain as your main site.

Important note – properly configured server-to-server tracking is unblockable and will improve the data you’re receiving. Unfortunately, conversions reported back to ad networks will still drop some of the data. This is just of life now.

In saying that, getting as complete and as accurate data as you can is still crucial because it enables you to make data-driven decisions. So important when deciding what to scale and what to kill.

Recommended Stack

Tracking is it’s tricky to setup right, when compared with pasting a dirty ol’ tracking pixel.

While other options exist, the foundation of our recommended tracking stack is Google Tag Manager, Google Tag Manager Server-side and Google Analytics 4. We choose this particular setup because it’s low-cost and configurable.

Using this tracking system, we can send data anywhere, including Universal Analytics, Google Analytics 4, Google Ads, Facebook Ads, TikTok Ads, Hotjar, Hubspot, Klavio, Salesforce, Zapier, webhooks, data warehouses, etc.

SIDE NOTE – Google Ads, Google Analytics 4, Google Tag Manager, BigQuery, and Data Studio are a family of tightly integrated products. This is Google’s vision of a complete, modern marketing suite.

Conclusion

Browser tracking will eventually die.

Server-side tracking is the future. It improves analytics reporting as well as conversion data sent back to the ad networks (although, as previously mentioned, doesn’t completely fix Facebook and Google Ads.)

Got questions? Ask away!

Need Help?

Schedule a brief free call to discuss your project.

Recently, had a client who thought their Facebook Ads were doing 5x better than what they actually were because of what FB Ad reports were telling them.

Another client discovered their Google Ads were 3.5x more profitable than their FB or Tiktok campaigns, but FB Ads and Google Ads were telling them different stories.

I’ve seen it over and over.

How do we notice this when clients and their ad agencies, spending tens of thousands per month, completely miss it?

In short, attribution modeling.

Sounds fancy, but it’s quite simple. In a nutshell, it means that when a customer buys today, it was likely due to one or more events that happened several weeks or months ago.

For example — someone sees your ad on Facebook and clicks it. Get’s distracted because their wife asks them to drop off clothes at the drycleaners. 2-weeks later, remembers you and does a google search. Clicks an organic link. 3-months later, sees a Youtube video and manually types your URL into their browser, then finally buys a product from your site.

Reality is a LOT messier than those seductively simple funnel diagrams!

These days we are spoiled for choice with some very cool tools for doing attribution modeling…

The ones I get asked about most often are HyrosWickedReports, and Segmetrics.

All great products.

Each has pros and cons.

But what if I told you you could get MOST of the functionality you need just using the FREE version of Google Analytics?

How?!

I’ll get to that in just a moment.

First, lemme briefly share my brief opinions on the 3 aforementioned options…

Hyros is simple, easy, fast, and has the nifty chrome extension that tells you what your CPL and revenue are in the FB ads and Google Ads dashboards.

Depends on your business. Starts at $500 and increases as your ad account grows.

WickedReports is far more sophisticated, but also comes with the downside of being overwhelming to those who are relatively new to analytics.

Has a one-off setup cost. Then starting cost is$400 or $600 per month (depending on the plan) and increases from there.

(Both Hyros and WickedReports can get up into the thousands of dollars per month for bigger accounts.)

Segmetrics has features of both but is not as sophisticated as WickedReports. The cheapest of the 3 options in terms of fees. Costs $175 or $495 per month

OK, now, let’s get back to Google Analytics…

You can get most of the functionality you need in Google Analytics just by setting it up properly.

Here are the steps I do when setting up Google Analytics:

1. Format the incoming data stream to include ecommerce data. (Shopify and Woocommerce do this natively. Other systems need some hand-holding to get this data into UA / GA4 in the right way.)

2. Set up referral exclusions

3. Set up cross-domain tracking settings in GTM or Gtag

4. Configure Goals (or conversions in GA4)

5. Google Analytics has native integration with Google Ads. All you have to do is enable the Google Ads integration in your Google Analytics settings.

6. Finally, import ad-cost data

Hardly anyone does this last step (6), yet it makes a HUUUUGE difference to your ability to make data-driven decisions! (Trademark pending).

Facebook Ads, Tiktok, Pinterest, and Outbrain ad data have to be imported manually.

To do so, first export ad cost data from your Ad Network.

Then, give your data the following column headers and save it in CSV format:

Column Headers for GA4:

ga:date

ga:medium

ga:source

ga:adClicks

ga:adCost

ga:impressions

ga:id

ga:name

Column Headers for Universal Analytics:

ga:date

ga:medium

ga:source

ga:adClicks

ga:adCost

ga:impressions

ga:campaign

Finally, import the data. (Once again, you’ll find this setting in the UA and GA4 settings.)

CONCLUSION

By getting your Ad Cost data into Google Analytics, you gain POWERFUL insights… where customers are coming from… their journeys through your pages, sites, networks, and other assets… what’s getting customers to buy… which campaigns to kill, and which ones to scale.

It’s a GAME CHANGER!

Once you’ve got your ad cost data in GA, you gain a much clearer picture of CPLCPACLTV, and ROAS.

Once you start doing this, you will NEVER again rely on the reporting of Facebook or Google Ads.

It’s like having analytics superpowers.

I manage dozens of client analytics accounts with a number of them spending $150k to $700k per month on ads. I can tell you with certainty that 99.9% of marketers are not even aware that this is possible with Google Analytics!

Hope you found this post useful and makes you lotsa MUNEEZ.

Got questions? Ask away!

Found this post valuable? Please share.

Want to see more in-depth resources on how this is done? Check out my Google Analytics Attribution Models guide.

Need help setting up best-practice tracking, analytics reports, and training the ad network A.I.s to send you better traffic? schedule a call to discuss your project.

PEACE!

Google Ads Enhanced Conversions (or GEC) is Google’s version of Facebook CAPI. It uses hashed user data to capture conversions that would otherwise be lost due to ad tracking-blocker technology.

In this article, you’ll learn the 4-steps to implement Google Enhanced Conversions with Google Tag Manager Server-side. I recommend avoiding the  Global Site Tag method because it’s a browser-based solution (read more about this below).

Prerequisites

Before attempting this method, make sure you have the following already set up:

Google Tag Manager web container with tags:

  1. Google Analytics 4 configuration
  2. Google conversion linker

Google Tag Manager server-side container with tags

  1. Google Ads conversion tracking tag
  2. Google conversion linker

A little background around why solutions like Enhanced Conversions are growing increasingly important…

The iOS14 Debacle

Recently, we saw the advent of iOS14 and its new privacy protocols, blocking all 3rd-party cookies and shortening the expiration time of 1st-party cookies to just one week.

Apple further stipulated that Facebook had to limit the extent of events and data extracted from users on iOS and Safari devices.

Apple had two main reasons for its actions:

  1. Facebook makes a LOT of money from Apple’s users’ data (and wasn’t giving Apple a kickback). Similarly, Google misses out on massive potential revenues from data Facebook gets from Android devices.
  2. People were gradually waking up to the fact that their personal info, browsing habits, location, and purchasing behavior were being passed onto goodness-knows-who to do goodness-knows-what.

Look to the “Cambridge Analytica” saga to get a sense of just how user data can be misused.

This set in motion a series of dominoes that are seeing the likes of Android and browsers like Brave, Opera, Firefox, and even Chrome starting to take similar stances on privacy by tightening up the data available to third-party trackers.

What this means for digital advertisers is it’s getting harder to know what’s really going on with marketing campaigns.

Insights from Facebook CAPI

The way Facebook handled iOS14 is interesting because it was the first to come up with a comprehensive response to iOS14… probably because they were the most affected and stood to lose the most.

Conversion API had been available for 2-years prior, but most advertisers stuck with the Facebook Pixel because it was MUCH easier to set up.

CAPI, a server-to-server tracking solution involves passing hashed personal info such as name, email, mobile, zip, city, state, country, and user-agent, to create a redundant conversion data stream in case of having conversion tracking blocked in users’ browsers.

Based on results we’ve seen from clients, we estimate around 17% or more of data is blocked in browsers and devices, and FB CAPI does a solid job of filling in a good chunk of these missing pieces.

Server-Based vs Browser-Based Tracking

iOS, Android, browsers, and ad blockers will continue to tighten up privacy by blocking connections between users’ devices and external 3rd-party trackers… likely due to increasing pressure from pro-privacy groups who eagerly litigate the tech giants when they overstep the mark.

Apple, Android, Brave, Opera, and other platforms harness the power of Machine Learning to detect tracker footprints and then start blocking them. So over time, we can expect browser-based tracking solutions to become less and less reliable.

However, these same technologies will not block the devices from sending data back to the same root web domain that a user is visiting. The reason for this is devices and servers need to be in regular communication for modern websites to function correctly. If this behavior stopped, then probably 80% of all websites would stop working!

Herein lies the power of server-based tracking… by sending customer data and transaction data to a server on your root domain (e.g. sgtm.yourdomain.com), you can forward that same data to any endpoint of your choosing, including Google Ads, Facebook Ads, Tiktok Ads, Pinterest Ads, Universal Analytics, Google Analytics 4, and more.

For the time being, this type of tracking technology can’t be blocked.

Why GEC with Global Site Tag is Kind of Pointless

You could theoretically implement Enhanced Conversions using GTM browser OR Global Site Tag if you really wanted to. Both are possible. But, for the aforementioned reasons, doing so is kind of pointless.

Remember, any tracking technology that runs in the browser can easily be blocked, which means you’ll lose ever more conversion measurement data.

In short, Enhanced Conversions MUST run from the server in order to do it’s job properly (and Google Tag Manager Server-side is an excellent way to do this).

Reliable Data Matters

There are two COMPELLING reasons for going to lengths to collect complete, reliable data.

The first is reporting. When blending data from ads, CRM, shopping carts, and other sources, the more accurate your reports and dashboards will be. In short, you’ll be clearer about what’s happening in your growth engine.

Second, the Ad Platforms’ A.I. that auto-automizes your ads all require CLEAN data.

Junk in ==> junk out.

The better quality signals you give the robots to work with, the better results they will deliver in the form of quality traffic.

Why Google Released Enhanced Conversions

I watched bemused as Facebook tore it up in the process of rolling out Facebook CAPI. At the time, it was obvious that they panicking.

iOS14 basically turned the ad world upside down!

I had in-depth discussions with several high-rolling digital media buyers, trying to get a bead on what iOS14 and CAPI would eventually mean for advertising.

Meanwhile, we didn’t hear a peep from Google. It’s almost as if they didn’t care.

Somehow, we thought, Google must have had this sewn up with their World-class predictive modeling… and from what we saw, Youtube Ads appeared to be far less affected than Facebook, even with advertisers running CAPI.

But as the months passed by, we saw CAPI improve. Probably because it took a while for their Machine Learning to adapt to the new data sets.

In the past, if you wanted to send server-side conversion data you’d have to go through the hassle of applying for Google Ads API access.

So, it was a nice surprise to finally see Google Ads roll out their own GTM version of CAPI with Enhanced Conversions.

How Google Enhanced Conversions Work

Similar to Facebook CAPI, Enhanced Conversions hashes customer data- email address, phone, first name, surname, street, city, region, country, postcode and combines it with IP address, user-agent, and other data from Google Analytics 4.

It shouldn’t surprise us to hear that Google cross-references user account data across gmail, Youtube, Workspaces, and hundreds of other product accounts in order to attribute a conversion action back to a specific Google Ad.

As far as we know, because the data is hashed using the SHA256 algorithm, theoretically user personal info is protected under GDPR and CCPA laws.

Personally, I’m highly skeptical about their claims… My theory is that Facebook and Google have the smarts to know who a specific user is, regardless of whether personal data is encrypted or not.

4-Steps to Implement Enhanced Conversions using Google Tag Manager

As I mentioned at the beginning, this article is going to get REALLY long if I have to explain how to set up Google Tag Manager, GTM Server-side, and Google Analytics 4. I’ll link to each topic as I create a separate in-depth article for each one.

Now that you understand why we’re doing things the way we are, let’s go through the actual steps. It’s quite simple as long as you’re already collecting data from your system and storing them as data layer variables in GTM.

Here’s a basic overview of what we’re doing:

Turn on enhanced conversions in Google Ads dashboard

Collect user provided data

Send data from GTM web container to GTM server container

STEP 1. Google Ads Conversion Settings

Login to your Google Ads account – https://ads.google.com/

In the top navigation, click “Tools & Settings”.

Under the “Measurement” submenu, click “Conversions”.

Then click the link for the conversion you want to enable for Enhanced Conversions.

Scroll to the bottom and toggle the option labeled “Turn on enhanced conversions” and choose Tag Type “Google Tag Manager”.

The system will ask you to enter the URL where you have Google Tag Manager installed.

Input your URL and click the “Check URL” button. Then Google will go check and verify that you have a valid GTM setup.

If successful, you’ll see the following message in a light blue box, indicating you have Google Tag Manager installed.

Once that’s done, it’s time to feed user provided data to Google Ads.

STEP 2. User-Provided Data Variable

Google stipulates this the minimum data required to make Google Enhanced Conversions work:

Phone number (must be provided in addition to one of the other two pieces of information above)

Email address (preferred)

Name and home address (street address, city, state/region and postcode)

The upshot is, you must have the phone number, plus the email address and / or the full home address (street, city, state, country, postcode).

If you’re missing the minimum dataset, the conversion will fire as it does normally, but you won’t get the additional benefit of GEC matching events based on personal customer data.

Login to Google Tag Manager account – https://tagmanager.google.com/

If you don’t already have them in your GTM web setup, you’ll need to create data layer variables for email, phone, first name, surname, street, city, region, country, and postal code. My customer data layer variables look like this:

Click the “Variables” link on the left side panel.

Under “User-Defined Variables” heading, click the “New” button.

Give the tag a meaningful name, indicating that it’s to do with Google Ads and also “user-provided data”. The naming convention for tags, triggers, and variables is surprisingly important. It keeps GTM containers organized and helps with future maintenance. So try to be consistent!

Click “Variable Configuration” to reveal a dropdown menu.

GTM user-provided data variable

In the top-right search box, type “user-provided data”. As you begin typing, you’ll see the variable appear in the search results. Click to add this variable type to your GTM browser container.

GTM user-provided data variable

Next, click each box for email address, phone, first name, etc, and add the corresponding data layer variables from the dropbox list that appears. Note – the “Region” field expects state or province in capitalized 2-digit format (e.g. Arizona is represented by AZ).

GTM user-provided data fields

If you’re having trouble saving the changes, it’s because the User-Provided Data variable expects a value for ALL of the variables. It won’t save unless all of the fields contain a value.

At this point, you’ve created a special variable containing all of the parameters Google Enhanced Conversions needs in order to attribute events to the right source.

Now, we must somehow get this data to Google Tag Manager Server-side and the easiest way to accomplish this is with Google Analytics 4.

STEP 3. GA4 Tag Settings

Click “Tags” in the right sidebar. Then click and open the Google Analytics 4 configuration tag.

Toggle the checkbox labeled “Include user-provided data from your website”.

From the dropbox menu select the variable User-Provided Data variable you just created in STEP 1 and click “Save”.

GA4 settings – include user-provided data from your website (server only)

So far we’ve completed all the necessary steps for GTM Browser-side. Finally, we have one last option to configure in Google Tag Manager Server-side.

STEP 4. GTM Server-Side Google Ads Tag Settings

Login to Google Tag Manager Server-side container, click the “Tags” link in the left side panel, and open the Google Analytics conversion Tag.

gtm server side – google ads tag

Toggle the checkbox labeled “Include user-provided data”.

gtm server side – google ads tag – include user-provided data

Conclusion

To summarize, Google Enhanced Conversions is relatively quick and simple to set up as long as you already have Google Tag Manager Browser and Server-side, along with GA4 and Google Ads tags properly configured.

If you’ve just started down this path of server-side tagging, congratulations!

You’re well on your way to improving ad reporting and ad optimization. You’ve also taken some important steps along the way to building your own first-party customer data platform.

Next Steps

If you need help with any of these steps, drop us a line. We have a team of professionals whose sole job is to solve tricky conversion tracking issues for Google Ads, Facebook Ads, Shopify, Google Shopping, WordPress, Woocommerce, Woofunnels, Squarespace, Clickfunnels, and more.

Google Analytics is a POWERHOUSE for figuring out what’s working and what’s not in your marketing. When configured properly, you’ll gain insights similar to Wicked Reports or Hyros! In this guide, I show how with both Universal Analytics and Google Analytics 4.

What is Attribution Modelling?

An attribution model is a set of rules for defining how much conversion credit is assigned for each touchpoint prospects encounter on their journey to becoming customers.

Typical Customer Journey stages

Some campaigns are better at acquiring leads (Top of Funnel). Whereas other channels are better at converting those leads into paying customers (Bottom of Funnel). Attribution modeling allows advertisers to view their conversion data through different lenses and gain key insights into how and where their efforts are having an impact.

Why do you need attribution models?

Let’s say traffic is coming to your site via a Facebook ad, a display Google ad, paid search, Google Shopping, content strategy, Twitter, and Reddit.

Which channels are responsible for making revenue and which ones are losing money?

Typically, a number of channels play a role in converting prospects into customers and each should get a fraction of the credit.

But each ad network attempts to claim as much credit as possible for conversions they see even when they contribute very little to the end result. The reason they do this is they’re in competition for your advertising dollars.

The more conversions, the healthier your ROAS, and the more likely you’ll continue spending money.

It’s why, when you add up the conversions from ad reports, the sum is significantly higher than the actual sales.

This is important when deciding whether to kill vs scale digital marketing campaigns. Without having an accurate picture of how each marketing effort performs, you risk making costly errors by over-investing in unprofitable channels and underinvesting in profitable ones. Either way, you leave money on the table.

How do you track marketing attribution?

To attribute conversions properly, you need to collect detailed data about traffic sources, transactions, and customer details. Then you need to blend data sets together so you can run sophisticated attribution queries.

It’s nearly impossible to do this with a spreadsheet application.

Luckily, Google Analytics makes this relatively easy. All you have to do is feed it the right data format.

Multi-touch Attribution Models in Google Analytics

To unlock the power of multi-touch attribution, you must either have conversion goals or eCommerce enabled in Universal Analytics. Here’s an example of a dataLayer payload for Universal Analytics.

Google Analytics 4 has purchase conversions and Ecommerce enabled by default. So, as long as you’re collecting revenue data, you’ll already have access to the Model Comparison Tool. Here’s an example of a dataLayer payload for GA4.

What attribution models are available in google analytics?

Google Analytics has a number of excellent models, depending on the version (e.g. UA vs GA4).

Last Touch Attribution Model

google analytics attribution models - last non-direct
Last Touch Attribution Model

This model answers the question, “What’s causing prospects to finally buy?”

This is your Bottom-of-funnel (BOF) traffic. Prospects already know about you and are probably ready to buy. This is the type of traffic that comes from email or retargeting campaigns.

ALL credit is given to the last interaction, while other channels that assisted in the conversion are ignored.

Last Non-Direct Attribution Model

Last Non-Direct Attribution Model

A big portion of sales will come from direct visitors. But logic tells you these people didn’t suddenly come to your site without some kind of prior awareness.

Weeks or months ago, prospects could’ve clicked a Facebook Ad, or found you in a Google search.

Perhaps, at the time, they weren’t in a position to say “yes” to your offer. So, they bookmarked your site and came back later.

This behavior is typical. So, you gain more insight by looking for the interaction just before a direct visit that leads to a sale.

Similar to Last Touch, ALL credit is given to the last non-direct interaction.

Last Google Ads Click Attribution Model

Last Google Ads Click Attribution Model

This model is similar to Last Non-Direct Touch, except it gives all possible credit to Google Ads clicks. It’s useful for specifically understanding how Google Ads (Google Adwords) are peforming.

Time Decay Attribution Model

Time Decay Attribution Model

In psychology, there’s a phenomenon known as Recency Bias, where recent events influence you more than ones that happened a while ago.

Time Decay models this by assigning more of the credit to recent events.

First Touch Attribution Model

First Touch Attribution Model

This model answers the question, “Where do customers intially coming from?”

This type of traffic is cold and is known as Top-of-funnel (TOF). Prospects are unaware of your business. Campaigns are geared towards building awareness.

ALL credit is given to the very first interaction, while other channels are ignored.

Linear Attribution Model

Linear Attribution Model

This model gives a broad view across all of your funnel touchpoints.

It’s useful to gaining a general understanding for where revenue is coming from. Start with Linear Attribution for initial ROI investigations before drilling deeper with the other models.

Credit is evenly distributed among channels.

Position-Based Attribution Model

Position-Based Attribution Model

This model gives the 40% of the credit to the first and 40% to the last interactions, with the remaining 20% distributed among the other channels.

Data-Driven Attribution Model (GA4 only)

Data-Driven Attribution Model

Of all the models, the Data Driven is the most sophisticated. (Only available in GA4.)

GA4 analyses your e-commerce data using machine learning to create a probabilistic model. Each marketing channel is then given a fraction of the available credit.

Data-Driven gives the most accurate gauge of how various channels and campaigns are performing.

What attribution model does Google Analytics use by default?

Universal Analytics uses Last Non-Direct Touch… even though its own documentation says it uses Last Click.

On the other hand, Google Analytics 4 uses Data-Driven out of the box, which is the most accurate of all attribution models.

What is the default attribution window for Google Analytics?

The default attribution window for Universal Analytics models is 30-days. However, you can create custom models with longer periods.

GA4 applies a 90-day look-back window by default.

How do you set up multi-touch attribution in Google Analytics?

GA4 and UA use mult-touch attribution models by default. There is nothing to set up per se.

However, you’ll want to use the Model Comparison tool for marketing analysis. (See below).

Can you change the attribution model in Google Analytics?

You can’t change the default account attribution model in Universal Analytics. You can however apply a  different model to a specific view.

With GA4, however, you can change the model for the entire account. Here’s how you do it:

Attribution model account settings for GA4
  1. Go to Admin > Property > Attribution Settings
  2. Select an attribution model (Data-driven is recommended)
The default attribution model for GA4 is Data-driven

3. Choose the ‘look back’ windows for acquisition and conversion events:

You can set the conversion window to a maximum of 90-days

Google Analytics Model Comparison Tool

Both Universal Analytics and Google Analytics 4 have a Model Comparison Tool.

What is a comparison view in google analytics?

The Model Comparison Tool allows you to compare two different or three models.

Here’s how to analyze marketing data in Universal Analytics.

First, filter by source / medium:

Source / Medium is a most common way to view ad data in GA

In the image above, CPA for google / cpc is $33.44 (Last Non-Direct Click) or $23.12 (First Interaction).

This result makes sense… some prospects visit your site without taking action until subsequent visits. That’s why Last Click numbers are lower than the First Interaction ones.

You can also change the view to show either CPA, value (revenue), or ROAS.

Universal Analytics allows you to study cost-per-action (CPA) and ROAS. GA4 only allows has revenue and conversions view.

To understand the ROAS of your advertising campaigns, select the Conversion Value & ROAS option from the dropdown.

In the example above, the ROAS for Last Non-Direct Interaction is 409%. But when comparing it with First Interaction, we get a figure of 594%.

By the way, if you want to see ROAS data for Facebook, Titkok, Pinterest, and other ad networks in this report, here’s how you can import your ad-cost data.

NOTE – At this point in time, GA4’s model comparison only allows you to view conversions & revenue. So, until GA4 updates this tool, stick to Universal Analytics for analyzing CPA and ROAS.

 

Why use the google attribution model comparison tool?

No single model is ‘correct’. Think of the different models as lenses you can use to answer different questions.

Here are some examples of questions you might ask:

Using one lens is not enough to answer these questions. I recommend starting with Linear Attribution to understand overall effectiveness of your various marketing channels, then drill deeper with the other models.

The Model Comparison Tool speeds up this process.

Where is the Model Comparison Tool in Google Analytics?

In Universal Analytics, go to Conversions > Attribution > Model Comparison Tool.

In GA4, go to Advertising > Attribution > Model Comparison.

What is MCF channel grouping in Google Analytics?

This is the set of groupings GA gives you by default. For example –  Direct, Organic, Social, Search, Email, etc.

To edit the existing Channel Group or to add your own definition, go to:
Admin > View > Channel Settings > Channel Grouping.

Edit existing or create custom channel groupings in Universal Analytics. (Not available in GA4.)
What is the default attribution window for Google Analytics?

For Universal Analytics, the default window is 30-days, but can be extended to 90-days by creating a Custom Attribution models.

Google Analytics 4 comes standard with 90-day windows.

What is a custom attribution model in Google Analytics?

Universal Analytics gives you the option of creating a Custom Attribution Model. (GA4 doesn’t have this feature yet.)

How to create a custom attribution model in Google Analytics?
Universal Analytics allows you to create a custom attribution model. GA4 doesn’t allow you to do this.

In the Model Comparison Tool, click one of the model-dropdowns, then select the “Create new custom model” option from the menu.

  1. Give your model a name
  2. Choose a baseline model to start with
  3. Adjust the Lookback Window (I suggest 90-days)
  4. You can also adjust the amount of credit based on source, campaign, time on page, etc.

Choosing the Right Attribution Model

How do you choose the right attribution model?

Before killing campaigns, ask yourself, “Is this campaign delivering value for Top of Funnel, Middle of Funnel, or Bottom of Funnel campaigns?”

Top of Funnel (TOF) is the hardest to get right, likely less profitable than BOF, but has the most potential for scaling. Use First Touch to see which channels and campaigns are profitable.

You might have a campaign that’s working well in Middle of Funnel (MOF) or Bottom of Funnel (BOF) but not Top of Funnel. Check Linear Attribution before killing low-performing campaigns.

Finally, you may find a campaign becomes sufficiently profitable when you suppress cold traffic (TOF).

Which attribution model is the easiest to use?

Last Touch is the easiest model to use. That’s also why it’s the most commonly used.

What is the best attribution model for lead generation?

Last Non-Direct Touch is the best model to use for lead generation analysis. The reason is, most prospects won’t naturally gravitate back to a lead gen landing page unless directed back by an ad or other marketing campaign. In other words, they don’t normally bookmark the page and return in 2 to 3 months. So Last Non-Direct Touch is fairly close to reality.

However, these leads can easily take 3-months to 2-years to convert. In this scenario, Data-Driven is ideal.

Keep in mind, with Google Analytics you’re limited to a 90-day ‘look back’ window. Visits that happen outside the 90-day cannot be attributed.

For greater flexibility with conversion windows, you’ll have to stream your GA4 data into BigQuery and create attribution dashboards in DataStudio. Go to Admin > Property > BigQuery links.

Stream GA4 data to BiqQuery
Stream GA4 data to BiqQuery

When you connect GA4 to BigQuery, if you haven’t already got a Google Cloud Platform account, you’ll be asked to create one and then add your billing details.

Wrapping Up

GA powers web analytics for MILLIONS of businesses around the World. But most are not enjoying it’s full benefits.

To use Google Analytics attribution models, you need Ecommerce configured with data being fed in the correct format. Alternatively, you can setup conversion goals… just make sure you’re sending revenue data with the events.

Side note – I haven’t covered it in this article, but you should be running Google Tag Manager Browser AND GTM Server. Why? Because GTM Server cannot be blocked by iOS14+, Safari 14+, and other ad tracking blocker technologies. This has an impact on both your analytics reporting and your ads, because ad networks require good clean data to optimize your ads properly.

Google Analytics 4 offers the more accurate Data-Drive Attribution Model. But GA4 doesn’t allow you to create custom attribution models.

Universal Analytics has a more powerful Model Comparison Tool. It’s especially useful for analyzing CPA and ROAS. This gives you Wicked Reports or Hyro-like reporting powers! The only drawback is the lookback window is limited to just 90-days.

Update – Universal Analytics is departing in July 2023. So, make sure to migrate your analytics to GA4 as soon as possible.

For the time being, I find myself using both tools.

For sales cycles that take significantly longer than 90-days, you can enable the native integration between GA4 and BigQuery, then analyze your data with python and Data Studio.

Need Help?

Feel free to Schedule a call to discuss your needs with any of the following:

Add Google Tag Manager to Shopify

In this article, I share 5-steps to add Google Tag Manager to Shopify. This should take 5-minutes or less to complete.

(Note – In this article, I’m not covering how to set up marketing tags for Universal AnalyticsGoogle Analytics 4, Google Ads, Facebook Ads, and other integrations. To keep this brief, I’ll cover these related topics in subsequent articles.)

Why Use GTM on Shopify?

If you want to run profitable digital marketing campaigns for your Shopify store, you must track every meaningful step of your checkout process.

This helps you understand the effectiveness of individual marketing campaigns… customer journey… customer lifetime value… ROI of your various products… content effectiveness… and so on. As a result, you can learn where exactly to focus your resources so you grow your business.

Basic Shopify comes with some analytic capabilities called Shopify Analytics. This displays purchases, revenue, refunds, and even UTM data for referral traffic from other sites.

Universal Analytics is also a native Shopify integration that includes Enhanced Ecommerce TrackingBut Shopify only sends this conversion data to Universal Analytics and not to Google Ads.

Also, if you’re running Facebook ads, there are currently major issues with Facebook Pixel and Facebook CAPI not de-duplicating properly (hundreds of store owners complaining about this on Reddit)… so you end up double-counting conversions. This in turn screws up the reporting and profitability of your ad campaigns.

Lastly, there’s still no support for Google Analytics 4 – Google’s much improved Google Analytics product.

This means if you’re relying on Basic Shopify default features, you’re likely missing out on many profit-improvement insights.

Google Tag Manager (or GTM for short) unlocks the full power of your conversion tracking & analytics power of your ecommerce data. The only downside is, you normally have to upgrade to Shopify Plus, starting at $2,000 per month. (Fine if you’re an enterprise customer but hard to justify for smaller stores.)

The good news is, our solution doesn’t require Shopify PlusYou don’t even need a Shopify app for this to work.

So now we’ve covered the ‘why’ let’s go over how to set it up:

5-Steps to Install Google Tag Manager on Shopify

Step 1- Create a Google Tag Manager Container

Head on over to https://tagmanager.google.com/ and click Create Account to create a new Google Tag Manager account (if you don’t have one already).

google tag manager account

Give your account an appropriate name. for example, your business name.

Select your country.

Name your container. I normally use the domain name of the store as a name.

Then choose “Web” as the target platform.

create google tag manager container

Step 2 – Get Your GTM Code Snippets

Once you accept Google’s terms (if this is your first time using Google Tag Manager), you’ll see the dashboard for your new web container.

You will also see a popup containing two code snippets… one for the <head> and the other for the <body>.

Copy and paste these into a notepad. We’ll use them in just a moment.

gtm code snippets

Step 3 – Add GTM to Shopify Liquid Theme File

Now that you have your GTM head and body snippets, it’s time to add them to your Shopify store.

To do so, log in to your Shopify account.

In the left-hand sidebar, click the “Online Store” link.

Shopify sidebar

Click the “Actions” button, and choose “Edit” to open the Shopify theme editor.

Shopify theme editor

The theme.liquid file should open by default. If it doesn’t, click the link in the left side panel labeled “theme.liquid“.

There are two places to paste the code snippets you grabbed earlier. Note – you have a <head> snippet as well as a “body” snippet. Each one must be pasted in the right place.

Paste the code snippet just after the opening <head> tag. This code actually loads Google Tag Manager.

GTM head snippet to add google tag manager to Shopify theme.liquid

Now, scroll down until you see the opening <body> tag and paste the second code snippet (see the blue outline in the image below). This handles the scenario when a user’s browser doesn’t allow Javascript to run.

Add GTM body snippet to theme.liquid

Click the green “Save” button to update your Shopify theme.

Step 4 – How to Add Google Tag Manager to Shopify Checkout?

Now the GTM container code will load on all of your main pages.

At this point your setup is capable of tracking e-commerce events such as Page View, View Item, Add To Cart and Checkout, but NOT Purchase completion… unless of course, you’ve upgraded to Shopify Plus.

As a result, we have one more step in order to enable event tracking for Purchase actions.

This requires adding the GTM code snippet to your “Checkout Settings”.

Let’s go there now.

First, click the “Settings” link at the bottom of the left-hand sidebar of your Shopify admin.

Shopify settings

Click “Checkout”.

Shopify checkout settings

Then scroll down until you see the section labeled “Additional Scripts”.

Paste your <head> code snippet in the box provided.

Shopify checkout additional scrips - GTM script

Step 5 – Verify GTM Snippet is Installed Correctly

Finally, you need to check everything’s working correctly.

In your Google Tag Manager container dashboard, click the “Preview” button in the top right-hand corner of the page.

Google Tag Manager preview mode

Enter the URL of your store in the Tag Assistant popup that appears.
Google Tag Manager Assistant popup

Now, in the bottom right-hand corner of your screen, you should see an overlay box displaying the word “Connected”. This indicates the correct Google Tag Manager tag is found installed on your site.

Tag Manager connected confirmation

Following these 5-steps, you should have your Google Tag Manager installation loading in your Shopify website in just a few minutes.

In future articles, I’ll go into detail on how to use Google Tag Assistant to debug your setup. This is essential for getting all of your conversion trackinganalytics, and other integrations working correctly.

Next Steps

Installing the GTM code on your Shopify pages is just the beginning. Next, you need to consider:

If this all feels overwhelming, don’t worry! Rome wasn’t built in a day.

First, get the GTM code installed. Next, get Google Analytics and Enhanced Ecommerce working via Google Tag Manager, along with all of your events showing up properly in your Google Analytics Account.

Then you can add other tracking tools and integrations, as you need them.

Conclusion

We’ve covered a lot here. Hopefully, it all makes sense!

You might find the 5-steps covered here easier to follow if you check out the accompanying Youtube video.

If you have any questions please leave them in the comments below.

Also if you’ve found this content valuable, please like and share. It helps others who are struggling to improve their Shopify tracking too. Thanks!

Copyright 2024 - Privacy Policy