Top Scroll

Conversion Tracking with Google Tag Manager

Conversion Tracking with Google Tag Manager

Introduction

Google Tag Manager (GTM) is the latest Google tool to manage Google Analytics (GA) and Google adwords. Because of this tool, it is easy to track conversions and traffic across different websites (cross-domain tracking).

As we all know Google Analytics is a data collector that captures the user’s count on a website. Also, it gives metrics about page views, events, and conversions. Conversion tracking with Google Tag Manager of the website is possible by integrating GA and GTM.

Google Ads is an advertising platform that is used for optimizing ad campaigns using Google accounts. If you connect all these three, here are some benefits that you will get:

1. Measuring ROI of Google Ad Campaigns: Setting up Google Ads conversion tracking tags within your Google Analytics setup allows you to accurately measure the revenue your ads are generating, going beyond simple clicks and visits.

2. Boost Conversion Rate: After analyzing users’ behavior in GA, website owners can identify the areas having higher bounce rates and those that need improvements.

3. Targeted Ad Campaigns: Having a better audience understanding helps in creating engaging ads that resonate with their interest.

Note: Before setting up the Google Tag Manager, users need to have an active account on Google Analytics and Google AdWords.

Set up Google Tag Manager, Google Analytics, & Google Ads

Before adding GTM scripts on the site, it is crucial to have a GTM container. Kindly refer to the steps mentioned below to initiate the Google Tag Manager conversion tracking.

1. Visit https://tagmanager.google.com/#/home page to create a container. Click on “Create Account”.

Create Google Tag Manager Account

2. Add relevant account information like company name, domain URL, country and others.

Add relevant account information
  • Click on Create to complete the container setup.

3. Once you have created a container, you will be redirected to GTM dashboard with the mentioned scripts in head and body tag.

gtm scripts

Google Analytics Setup Using GTM

Follow the steps given below to setup GA using Tag manager.

1. Go to Google tag manager’s site -> click on Tags -> click on new option.

click on new option

2. Choose tag type ->click on Google Analytics ->Choose Google Analytics: GA4 Event.

Choose Google Analytics: GA4 Event

Enter measurement ID

To have a measurement ID, there is an active Google Analytics account setup requirement. Here are the steps given below for setup.

1. Visit https://analytics.google.com/, Click on start measuring

visit google analytics

2. Then, create an account by entering right properties, business details and relevant information.

create an account

To get measurement Id -> go to Analytics panel ->At the Left bottom corner, choose “Admin” setting option-> Select Data streams options.

Select Data streams options

4. Click on available Data stream option, you will be redirected to “Web stream details” to copy Measurement ID. Then, enter it in GTM.

copy Measurement ID

5.Click on Event Parameter option to enter new event name and value. If you want track URL then enter page_location in event parameter and {{Page URL}} in Value.

Event Parameter option

6. In Advanced setting option, choose Tag firing options ->Select once per page.

Tag firing options

7. After that select new trigger option ->Choose trigger type ->Page View.

8. After that select “This trigger fires on” option -> Click on Some Page Views -> Select page URL option -> equals-> enter URL you want to track.

trigger configuration

After completing the conversion tracking tag creation steps, you need to use Google Analytics for event tracking as mentioned below:

Steps

When we will create a GTM tag, then the event name should be entered and it will appear in Google analytics dashboard within 24 hours.

Google Analytics for event tracking

However, if you want to track that same event as a conversion -> Click on “Admin”-> Events -> Click on toggle button to Mark as conversion.

Mark as conversion

Google Ads Conversion Tracking with Google Tag Manager

To setup a Google Ads, you need to use Google Tag Manager for a successful setup. Here are the key steps mentioned below.

In Google Tag Manager

1. Click on new tag -> Choose tag type ->Choose Google ads ->Click Google Ads Conversion Tracking.

Google Ads Conversion Tracking

2. After that enter conversion Id -> To get Conversion Id -> go to Google Ads dashboard -> click on conversion and then the conversion details will appear-> Click on Tag Setup -> Then, choose the tag type for which you will be creating a tag -> Later, choose “Use Google Tag Manager” option.

Use Google Tag Manager

Copy conversion id and the conversion label and use it in Google Tag Manger to create a tag.

conversion id and the conversion label

2. Assign data layer variables like conversion value, transaction Id, and currency code to track Google Ads. Leave blank if you don’t want to track conversion.

Assign data layer

How set Data Layer Variable?

3. Select the variables module->Choose variable type ->Select Data layer variable.

Select Data layer variable

4. Enter data layer variable name like “currencyCode” which you have set in data layer variable script.

data layer variable

5. How to Write a Data Layer Variable Script?

First, initiate the data layer variable array, then insert the variable into the array. Enter the event name that you wish to track.

<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'complete_track',
'value': '{/literal}{$smarty.session.orderdetails.TotalDue}{literal}',
'transactionId': '{/literal}{$smarty.session.orderdetails.OrderNumber}{literal}',
'currency': '{/literal}{$currency.code}{literal}'});
</script>

6. Insert the above script directly on the website page just above the Google Tag Manager script.

7. You can setup the trigger as per your requirement after events like transaction is successful, sent mails and etc.

AdWords Conversion Tracking with Google Tag Manager

You can check conversions on Google AdWords dashboard by creating conversion events.

1. Choose conversions from Tools and Settings ->Measurement ->Conversion.

2. Click on New Conversion Action.

3. Select tracking conversion option ->Website ->enter website domain ->Click scan -> Then open create conversion actions manually using code -> Click on ‘+.’

conversion action details

4. Fill conversion action details like

Goal and action optimization as purchase because you may need totrack conversion of payment -> Enter conversion name -> In Value of AdWords section, choose select same value for each conversion if there is (static value), but you have different value (dynamic value), then select Use different value for each conversion.

5. Then choose Count Option, if you want to track conversion for purchase then select “Every” conversion count option or else go with One option.

6. Attribution Module-> Choose Data – Driven attribution Module.

7. After complete create conversion -> Go to Google tag manager publish all details by clicking submit button and debug it using preview option.

submit button
The Author

In an ever-evolving digital era, I stand as a reliable and forward-thinking web developer, ready to transform ideas into functional and visually stunning realities. With a profound passion for web development, I am a seasoned professional with extensive expertise in PHP, Java, .NET, and various other programming languages.

For our blog visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
BLOGFAN10
Note: Copy the coupon code and apply it on checkout.