Google Tag Manager Practical Guide:Implementing AdWords Conversion Code | BCS

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

Google Tag Manager BCS 8 months ago (12-20) 453 Views 0 Comments

In this section, I will introduce several ways to implement AdWords conversion through Google Tag Manager. Suppose our conversion here is a successful purchase and a successful payment.

1、Transaction information on URL

The transaction information is on the URL of the successful payment. For example, if I shop on a website, the URL after the payment is successful is as follows:https://www.bbccss.com/thank-you?amt=12.90&cc=USD&cm=https://www.bbccss.com/store/powerrec.html?ads-gg-b&v=136&SRC=alltop-ads-gg -b & item_name = REC + Personal + License + (Monthly) (US) & item_number = 4721301_M & st = Completed & tx = 2MK38227H05439018

You can see that there is a lot of information on this URL, but only three pieces of information are needed for AdWords conversion: Conversion Value, Order ID, and Currency Code. If these three pieces of information are on the URL, then this method can be used.

This URL contains these three pieces of information, amt is the amount of the transaction, cc is the currency code, and tx is the order ID.

a、Create A Conversion On Adwords

Click this icon on adwords to start creating a conversion:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

Select website type:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

 

In Setting the code, category select buy;Conversion name named Purchase; value selection Use different values ​​for each conversion; Statistical methods select every time

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

After creation, you will see three deployment methods

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

we choose the last one:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

We get the Conversion ID and Conversion tag, these two will be used when setting later.
There is another note here. We need to implement the Conversion linker code. This is to generate a cookie associated with adwords, so that the conversion attribution is implemented. This is essential. We will set it up in the next step.

 

b、Implement Conversion Linker Code

Implementing the Implementation Conversion linker code is very simple. You do n’t need to do much configuration. Create a new tag directly in Google Tag Manager, then select Conversion Linker, and select All Pages as the trigger. The specific configuration is as follows:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

 

c、Get The Information From URL

ttps://www.bbccss.com/thank-you?amt=12.90&cc=USD&cm=https://www.bbccss.com/store/powerrec.html?ads-gg-b&v=136&SRC=alltop-ads-gg -b & item_name = REC + Personal + License + (Monthly) (US) & item_number = 4721301_M & st = Completed & tx = 2MK38227H05439018

As mentioned earlier, the information required for conversion is: Conversion Value, Order ID, and Currency Code, which we can obtain from the URL,amt is the amount of the transaction, cc is the currency code, and tx is the order ID.We can get those three pieces of information from the URL through Google Tag Manager variables.

Such as Conversion Value, Create a custom variable in the variable, then select the URL type and do the following configuration:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

This means that the field behind amt is stored in this variable, which is 12.90 in amt, which is the transaction amount.

Similarly set the Order ID, and Currency Code.

Order ID

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

 

Currency Code

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

 

d、Set Trigger

Since this URL appears only after the payment is successful, we can use this page as a trigger. The specific settings are as follows:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

Page URL is restricted, only this page will trigger.

e、Set Tags

Do the following configuration, where the Conversion ID and Conversion tag are to be created in Adwords, and the remaining three are used to obtain the variables:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

 

f、Preview

Preview the test and publish it after no problem.

2、Configure From DataLayer

Many e-commerce websites will deploy enhanced e-commerce. One step in enhanced e-commerce is purchase, which means that the payment is successful. Usually there will be detailed order data in it. We can use this to configure adwords conversion.

Enhanced e-commerce requires the data layer to pass data. You can see the data in the data layer in the preview state when the payment is successful:

<span style="font-size: 12pt;">window.dataLayer.push({
  event: 'eec.purchase',
  ecommerce: {
    currencyCode: 'EUR',
    purchase: {
      actionField: {
        id: 'ORDER12345',
        affiliation: 'BSC\'s shop',
        revenue: '11.00',
        tax: '1.00',
        shipping: '2.00',
        coupon: 'SUMMER2020'
      },
      products: [{
        id: 'product_id',
        name: 'MY PRODUCT',
        category: 'guides/google-tag-manager/enhanced-ecommerce',
        variant: 'Text',
        brand: 'SIMO AHAVA',
        quantity: 2,
        price: '3.50',
        dimension3: 'Ecommerce',
        metric5: 12,
        metric6: 1002
      },{
        id: 'another_product_id',
        name: 'MY ADD-ON',
        price: '1.00',
        quantity: 1,
        coupon: 'ADD-ONS OFF'
      }]
    }
  }
});
</span>

Note that there is an event inside, which is eec.purchase, which will be used for trigger settings.

The configuration of the first two steps is the same as the previous method. Here we will start from the third step c:

c、Get Information From The DataLayer

In the data layer, currencyCode, id, and renovation are what we need. It should be noted that they are at different levels. CurrencyCode is under ecommerce. CurrencyCode can be obtained from data variables through ecommerce.currencyCode, and data variables can be set. for:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

 

The id and revenue are actionFields under purchase, which need to be obtained through ecommerce.purchase.actionField.id and ecommerce.purchase.actionField.revenue. The specific configuration is as follows:

Order ID:


Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

Conversion Value:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

d、Set Trigger

There is an event in the data layer. This event is used to set the trigger. The specific settings are as follows:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

What is the event of the data layer, what is used here.

e、Set Tags

Do the following configuration, where the Conversion ID and Conversion tag are to be created in Adwords, and the remaining three are used to obtain the variables:

Google Tag Manager Practical Guide:Implementing AdWords Conversion Code

f、Preview

Preview the test and publish it after no problem.

3、Using JS  Variables

In this way, the information required for conversion is put on the page in the form of js variables, and then goes through the variables. The subsequent settings are basically the same.

In fact, it can also be in the form of cookies, but some users will block cookies, so it will cause less data, which is not recommended.


If you don't understand, You can leave a comment below or email me (haran.huang@ichdata.com).
Like (0)
Post my comment
Cancel comment
Expression Texture Bold Strikethrough Center Italic Sign in

Hi, you need to fill in your nickname and email!

  • Nickname (required)
  • Email (required)
  • Website