How to Get Adwords Dynamic Conversion Values in Google Tag Manager

Let's start

In our previous blog post about Adwords Conversion Tracking via Google Tag Manager, we learned to use Google Tag Manager for setting up Adwords conversion tracking easily.

In this guide, you will learn how to track Adwords dynamic conversion values with Google Tag Manager.

Tracking Adwords Dynamic Conversion Values via Google Tag Manager

As you might already know, GTM has a built-in template for setting up Adwords conversion. We need two basic things to get it running, conversion ID and conversion label. Both these values are available when we create our Adwords conversion code.

Besides this, we can also send the total conversion value to Adwords. A conversion value will be the total transaction value for the product. For example, if you are running an Adwords ad for a product, the Adwords conversion value would be the total value of purchases made by the visitor through the ad.

If you have a single product with a constant value, it’s very easy to send the conversion value by simply adding the total value as shown in the image below.

 adwords conversion tag 

The real problem occurs when you have multiple products or an ecommerce site and you have to tackle with dynamic values.

There are two ways to do this in Google Tag Manager. The first one is the strong method and needs sound knowledge whereas the second one is the alternate, less reliable and easy to implement.

Let’s have a look at how both methods work.

1. Pushing the Conversion Values to Data Layer

This is the most reliable method you can follow to capture dynamic values. For doing this, you will have to push the transaction value/conversion value to data layer from the backend using the data layer method.

If you are not aware of the data layer, you can read the documentation here or interact with your developer to send the values.

Once you push the value to the data layer, you will then create a data layer variable in Google Tag Manager to capture the dynamic values from the data layer.

Follow the instructions below to create the data layer variable:

Step 1: Go to variables from your tag manager account

Step 2: Create a new user defined variable

Step 3: Enter the name of your variable

Step 4: Click on variable configuration and select variable type as ‘data layer variable’

Step 5: Enter the data layer variable name (dataLayer.push({‘var’:’value’});)

 create datalayer variable

Step 6: Save this variable

Now, you have successfully created a process to capture the dynamic transaction value into a tag manager variable. The final step is to send this value to Adwords.

You can do this by simply selecting the variable name in the conversion value field when you create the Adwords conversion tracking tag as shown in the image below.

 adwords conversion value tag manager

Save this tag, publish and you are done with sending Adwords conversion value via Google Tag Manager.

2. Get the Conversion Value via Scraping Method

If you are not good at using the data layer method, then you can follow the alternate method known as scraping. This method works by capturing the transaction values from the page using jQuery as I have described, for implementing Facebook conversion tracking.

This is not the best or most reliable method because if you change your website’s design, the HTML elements will also change, which will end up giving you the wrong results, or worse, no results. But this can be used for a short-term purpose or when you don’t intend to change your website design.


Don't miss out when new resources launch

Our customer analytics experts share wisdom only once a month

Share now
We are customer-analytics consultancy that transforms messy data into actionable insights that will help you grow your company and make better data-backed decisions.