how to add event as conversions

Get Better Data with Leadfeeder and Google Tag Manager: How To Add An Event as a Conversion

22 December 2020

Conversions should be the centerpiece of your online marketing strategy. Tracking conversions accurately, however, can be a pain.

For example, how do you know if a Google Ads campaign actually drove more sign-ups? After all, maybe it was that blog post that went viral or your long-term SEO efforts. 

If you aren't accurately tracking data, you could be misunderstanding your data. 

This is why I want to talk about Google Tag Manager — what it is, how to use it, and why it matters. 

In this post, we'll cover the basics of Google Tag Manager and dig in a bit deeper to show how to use Google Tag Manager to send any website event as a page view to Google Analytics. 

I'll also show you how to use Leadfeeder to do similar tracking.

If you're already familiar with Google Tag Manager, you can skip the next section and get right to the good stuff.

Note: Want to keep track of your converted leads? Sign up and try Leadfeeder free for 14 days to gain access to relevant data such as companies visiting your website and viewing your content.

What is Google Tag Manager?

Google Tag Manager is a free tool that lets site owners easily launch and manage code snippets that track actions on a website (and sends that data to Google Analytics!)

If this isn't part of your website analytics tool belt, you are missing out.

Here's why.

Google Tags allow you to track detailed website behavior, such as how many accounts fill out your contact us page, how they get to your website (did that video marketing campaign actually drive leads?), what links they clicked on, and even how long they stay on your site.

Note: You can track a lot of this data in Leadfeeder, too!

The main benefit of Google Tag Manager is that it allows non-developers (like your sales or marketing team) to manage and track tags without having to involve your tech or dev teams.

More data, better accuracy, and easy enough for a non-dev to set up? Sign me up.

Is Google Tag Manager easy to use?

You will need some technical knowledge to make the most of Google Tag Manager. BUT, it is totally doable with a little know-how. (Like this article!)

How to set up Google Tag Manager

Ready to get started? Here's what you need to do.

  1. Sign up for a Google Tag Manager Account. (It's free!)

  2. Add the code to install Google Tag Manager. If you've added Google Analytics tracking or Leadfeeder's tracking code, this step will be easy. If not, follow this guide.

  3. Add tags and start tracking! Here's Google's guide to adding and updating tags. (Don't worry, we'll cover a few ways to use tags below, but that will give you the basics.

  4. If you are already a Leadfeeder user, make sure to integrate Google Analytics and Leadfeeder so you can sort data in our custom feeds.

Now, let's talk about how to track conversions using Google Tag Manager.

What conversions can you track with Google Tag Manager? (and why it matters)

Google Tag Manager allows you to track many different conversions, including clicks, page views, page URL, and virtual page views. The type of conversion you want to track will depend on what action you want your prospects to take.

For us, at Leadfeeder it’s the sign-up, for example. We want our visitors to sign up for our tool. So, whenever someone visits the last page of our sign up funnel, we know they’ve converted, that is, signed up.

But we also want to know how they got to that page. Did they start out comparing us to another tool like Albacross or did they find us by reading our blog about using IP data to improve intent data?

Understanding the path to conversion allows us to create better content and more effective marketing campaigns.

Two of the conversions we track the most are conversion by page URL and virtual page views. 

Conversion by page URL

If your conversions are based on the page URL, then setting up conversions is simple. All you have to do is to go to your Google Analytics settings and create a new Goal and use Destination in Goal details to set up your URL.

We can track this in Leadfeeder, too, of course. All we have to do is to create a new custom feed based on the Page URL and use this page as the filtering criteria. This Custom feed will then show only those leads that have converted.

Virtual pageviews in Google Tag Manager

One neat trick that Google Tag Manager has is the ability to send virtual pageviews. Virtual pageviews are pageviews that are not actually pageviews. 

I know, I know. Confusing much? 

Virtual page views can be triggered by any user action (or other event) and once they are triggered, a pageview is sent to Google Analytics.

You can use any triggers you see Tag Manager. A link click, the new video watched percentage, or a custom JavaScript event if that's what works for you. 

While you could also use Events to do this, the major benefit of this method is you can create funnels for your conversions. 

For example, you could create a pageview once a user starts a video, then another pageview once they’ve watched 50% of the video, and then a third pageview when they’ve finished the video. 

This gives you a more nuanced view of how users navigate your site and interact with your content. 

This pageview will show up as a regular pageview with URL and page title (if you want) and all other metrics you are accustomed to seeing with pageviews. Because they are just like regular pageviews, setting up conversions is as simple as in the previous example.

Setting up virtual pageviews

Let’s set up a virtual pageview for a button click. 

First, we need to identify which button or buttons we want to use for this trigger. We can use the Chrome Inspector to see our identifiers.

In this example, we could probably identify the signup button in the top right corner by using the classes button top-bar__link top-bar__link-button or the link destination or even the text Sign up.

Which identifier(s) you want to use depends on your setup. I would suggest using CSS classes or identifiers, but sometimes link targets or text are better.

To send pageviews from Google Tag Manager, you’ll have to do two things. First, you’ll have to make a trigger - a rule that says when you want to send the pageview. 

The next step is to create the actual pageview tag, where you can define details of the pageview (title, URL, etc.)

Because of how Tag Manager and Analytics work together, you’ll actually need a third thing, too: an Analytics Variable in Tag Manager.

Here's how to do it: 

Google Tag Manager send page views setup

Go to "Tags" and create a new tag. 

We want to fire an Analytics pageview, so in “Choose tag type” select Universal Analytics. We are creating page views, so in "Track Type" select "Pageview." 

After that, create a new Google Analytics variable in Google Analytics settings.

Type in your Tracking ID (hint: you should be using a Tag Manager variable for this) and select Fields to set. We want to send the URL and page title, so select page and title and type in the URL and title respectively. 

Save your new Analytics variable.

Now we have the correct Analytics tag that sends a pageview whenever it’s triggered. We haven’t yet set up a trigger, though, so it won’t fire ever. Let’s fix this.

In the tag creation screen at the bottom, you'll see a section called Triggering. Click on the section to select triggers.

Click on the plus icon on the top right. Now we need the details from the button that we got from Chrome Inspector.

If you can’t see "Click Classes" or "Click URL" in the list, you’ll have to activate them first. They are called Built-in Variables and you can activate them in the Tag Manager left sidebar “Variables”, clicking "Configure" and selecting the ones you want to activate. 

There are some very useful ones such as Video Title or Video Percentage that you might want to activate, too.

Now you have a new tag that fires on all clicks that match our identifiers.

When fired, the tag will send a pageview that has a URL and name like you set up. You can use the Tag Manager preview tool to check that everything works.

Note: Sometimes the virtual pageview is not visible in Google Analytics' real-time tool. If you can’t see visits in Real-Time view even if everything seems correct in Tag Manager debug, use today’s data in normal reports.

But now you probably want to see which companies see your video or download your white papers, so you probably have some GTM and Leadfeeder setup to do. See you later!

Note: Want to keep track of your converted leads? Sign up and try Leadfeeder free for 14 days to gain access to relevant data such as companies visiting your website and viewing your content.

Get more from your web analytics.

t’s time to turn your website traffic data into something more meaningful. Website visitor analytics enable you to identify and qualify the companies visiting your website, even when they don’t fill out a form.

Show me how

Related articles

Leadfeeder knows the companies visiting your website

Install today to start identifying new business opportunities.

See for yourself

Free trial. No credit card required.

As seen in

  • Forbes
  • Entrepreneur Magazine
  • Fox
  • Mashable
  • Social Media Examiner