How to Get Adwords Dynamic Conversion Values in Google Tag Manager

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 to track Adwords dynamic conversion values with Google Tag Manager.

Tracking Adwords Dynamic Conversion Values via Google Tag Manager

As you know that, 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 have an ecommerce site and you will 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 the method works.

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:

Step1: Go to variables from your tag manager account

Step2: Create a new user defined variable

Step3: Enter the name of your variable

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

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

create datalayer variable

 

Step6: 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 this for implementing Facebook conversion tracking.

This is not the best and reliable method because if you change your website design, the html elements will get changed too and will give you wrong details or nothing. But this can be used for a short term purpose or when you don’t intend to change your website design.

If you have any queries related to this topic, please ask us directly on Twitter and follow us for our latest updates.