BlogSoftware

How to use Fathom Analytics events to track ads conversions

Written by Codemzy on July 13th, 2022

In this blog post, I'll show you how and why I turned off conversion tracking in Google Ads and Microsoft Ads and started tracking ad conversions in Fathom Analytics instead. Bonus: No cookies!

This post contains affiliate links. If you use these links, I may earn a commission (at no cost to you). I only recommend products I use myself that solve a specific problem. In this post, you are recommended Fathom Analytics, a cookie-free, GDPR compliant, privacy-first website analytics software. Get $10 off your first invoice and a 7-day free trial when you use my referral.

If you use Google Ads or Microsoft Ads (or both) you probably track conversions. After all, if you're spending money on paid advertising, you want to know if people are converting.

And both Google Ads and Microsoft Ads let you track conversions for free. But it comes at a cost. Privacy.

Google (and Microsoft) auto-tag ad clicks with a click identifier (GCLID for Google, MSCLKID for Microsoft) and set cookies through a conversion script to track users on your website. So when they record a conversion, they know which click it came from (and which user).

a temporary cookie is placed on their computer or mobile device. When they complete the action that you defined, our system recognises the cookie (through the code snippet that you added), and we record a conversion.

- Google Ads About conversion tracking

You need to get consent from your users for third-party cookies, so adding conversion tracking means annoying cookie banners. You also need to allow users to opt out. And that means you won't get all your conversion data either.

Why use Fathom Analytics for conversion tracking?

I'm replacing Google Analytics with Fathom Analytics on a few websites for user privacy reasons (and to remove annoying cookie banners). But privacy concerns don't only apply to Google Analytics but to Google Ads (and Microsoft Ads) too.

If you don't already use Fathom Analytics, you can take a 7-day free trial and (if you decide to continue after the trial) get a $10 discount on your first invoice with my Fathom Referral.

But why switch to a paid service when you can track conversions for free in Google and Microsoft?

Here are the two main reasons I switched from free conversion tracking to Fathom Analytics (paid).

1. You can't track conversions without cookies in Google Ads

I don't want to have to show my users cookie banners or worry about consent. I always think twice about viewing a website when I'm presented with a cookie wall or pop-up, and I'll turn off third-party cookies if I can.

If you're using paid ads, the last thing you want a visitor to do is bounce off the page as soon as they arrive because they are confronted with a bunch of complex options, settings and toggles.

Both Google and Microsoft rely on cookies for tracking. If a user turns off cookies, you have gaps in your data. If you meet the requirements for consent mode, you get modelled (predicted) conversions to try and fill these gaps. But I imagine the more users who opt-out of cookies (or block Google/Microsoft tracking), the less accurate these predictions will be.

2. You can't track conversions without GCLID (or other personal data)

When I place an order on a website or sign up for an account, I never consider that the business is reporting that information back to Google. But that's what the free conversion tracking provided by the ad platforms does. The click identifier will be associated with a user profile, and knowing which websites you convert on builds a picture of who you are and what you buy.

To know how my ads are performing, I don't need to know which exact click generated a conversion from which user. I only need to know which campaign, ad group, and keyword the click came from.

I thought offline conversions could be a solution, and it would get around the cookie issue. But you still need to report the click identifier (or other user-specific information) which, without consent, would breach GDPR (I think - although I'm not a lawyer!).

The Pros

Ok, so if you're switching over to privacy-focused conversion tracking, here are the good parts:

  • Better user privacy
  • No cookies
  • No cookie banner
  • GDPR compliance
  • More complete data

Because you don't reply on cookies anymore (that can be blocked or consent withdrawn), you can record more events.

The Cons

There are a couple of bad parts to be aware of:

  • Conversion data is no longer visible on the ad platforms
  • Conversion based bidding strategies are no longer useful

Because you are recording conversions without user data on another service, you lose the ability to run automated bidding strategies that need conversion data (like cost-per-conversion).

How to set up events in Fathom Analytics

For cookie-free and privacy-focused conversion tracking, I use Fathom Analytics. And I'd recommend it to a friend.

The first thing you will need to do is to set up events. These are goals that you want users to take. Actions that make you money or keep you in business, like:

  • Registering an account
  • Purchasing a product
  • Signing up for your newsletter
  • Signing up for a subscription
  • Clicking a link

You can create events you want to track within Fathom. Select the website, then click the Event Management menu item. Under Add an event, give your event a name and pick a currency (this is so you can give your event a monetary value).

Fathom add event screen

Once you have your Event ID, recording the event can happen on your website. Whenever the event triggers, you call the trackGoal function.

fathom.trackGoal('YOUR-EVENT-ID', 0);

It could get triggered at the click of a button, on a page load, or in another function. For example, after a payment is processed.

processPayment.then(function(response) {
  fathom.trackGoal('YOUR-EVENT-ID', response.order.total); // track the purchase event
  completeOrder(response);
});

Tracking paid ad conversions with UTMs

Now you have your events, but that's just part of the puzzle. You can track how many people signed up for your newsletter or purchased a product, but how do you know how many came from paid ads?

UTMs.

A UTM parameter is the text included in the URL to understand where the traffic is coming from and, therefore, which content you’re sharing is the most relevant or best at converting to sales or leads.

- Fathom Analytics UTMs and campaigns

You can use UTMs for all your internal links, not just paid ads, but setting them up for paid ads is slightly different because you'll need to get some dynamic content. Like the campaign id, ad group, and keyword.

You don't need to set anything else up in Fathom to get this to work though. You'll just need to hop over to your Google Ads (or Microsoft Ads) account to make this work.

Here's how the UTM parameters will look:

utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}

For Microsoft Ads, replace utm_source=google with utm_source=microsoft. Anything within curly brackets is a variable and will update depending on which campaign, ad group, or keyword gets clicked.

Now you need to add these UTM parameters to your final URLs. I thought this would take forever to set up and require editing every ad. Great news, it doesn't!

You only need to add this in ONE PLACE.

In Google Ads, go to All Campaigns > Settings > Account settings > Tracking > Final URL suffix

Now paste the UTMs, here is it again for Google:

utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}

You can click the Test button to check everything looks ok before saving.

Google ads UTMs

Fathom won't work with GCLIDs, or any other user-identifying information because it's against their terms (as a privacy-focused solution). So you can turn auto-tagging off in your Google Ads account. You can do that from All Campaigns > Settings > Account settings > Auto-tagging.

You'll also want to remove conversion tracking and any associated scripts on your website and make sure your bid strategies don't rely on conversion data (I use manual CPC).

Microsoft Ads Final URL suffix

In Microsoft Ads, go to Settings > Account level options > Final URL suffix

Now paste the UTMs, here is it again for Microsoft:

utm_source=microsoft&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}

Microsoft ads UTMs

And if you already had conversion tracking set up previously, you can turn off Auto-tagging of Click ID (MSCLKID) since Fathom Analytics conversion tracking won't use that.

Getting conversion data

Now you are all set up. As soon as a user clicks on one of your paid ads, you will see that data* in Fathom Analytics. Scroll down to the UTMs section in the Fathom dashboard.

*If you're not seeing any data here yet, it might be because you've not had any visitors from paid ad clicks yet.

If you click Medium under cpc you'll see how many visitors and views you have had from paid ads. If you click on cpc, you will filter all your dashboard data (including events) by users that came from paid ads. So you can see how many conversions came from paid ads.

Still in the UTMs section, click on Source. You should see google and microsoft if you've had visitors from paid ads on both these platforms.

Click google to filter your dashboard by both cpc (Medium) (from earlier) and google (Source).

Now you can see how many conversions you have had from Google Ads.

Fathom conversion tracking

You can filter further by keyword (Term), campaign ID (Campaign), and ad group ID (Content).

Pretty cool!

I'd love to show the campaign name and ad group name in Fathom, but unfortunately, this doesn't get exposed as a dynamic variable for the final UTM parameters. I'm going to try and figure out a quick and easy way to get this into Fathom, or a report, and I'll blog about it when I do.