GTM MappingDatalayerVariables EN

From Wiki

Jump to: navigation, search

Português

Mapping Dalayer Variables in GTM

Datalayers offers simplifies access to order, lead or any other data in the advertiser`s website, to map this data and use it in the Awin Conversion Tag, we can follow the steps below:


1) You can use GTM's Preview mode to identify the path to these variables, the button sits on the top right corner of GTM:

2) When you connect to the website, you can follow a normal process to run a transaction (we suggest doing this in a test environment or canceling the transaction after it is done). Before you finish the transaction, we suggest you clear the event`s window in order to have an easier time finding the order event:

3) Finish the purchase in the website! 😊

4) You will note that the Tag Assistant window will be showing some event that fired when the transaction was finished, in my case, this was the "orderPlaced" event. (In caso you don't find any event that resembles a purchase event, please contact your IT department and have then map the Dalayer correctly in GTM using an event) Here is an example:

5) When you click in the purchase event, you'll see the tab "Dalayer" show up, this can be used to understand the structure of the Dalayer and identify the path to the variables you want to map:

6) As you can see in the image above, the parameters related to the order are inside of a sequence of variables To get to the "id" parameter for example, we need to go through “ecommerce” (marked in red with the number "1" in the image above), then through “purchase” (number "2" in the image above), enter “actionField” (number "3"), to only then finally reach the order parameters like the parameters "id", "revenue", "coupon", etc.

Note that these paths might differ for your Datalayer, but the process to identify the path, will generally stay the same!

7) Now that we know the path to the parameters, we can create new variables in GTM for each of the purchase informations we want to map:

8) These variables need to be of type "Datalayer Variable". Remember to name the variable according to it`s function, for this example, I`ll create the "Awin - Transaction ID" variable, to receive the order ID.

9) Now, simple use the path for this data and it should work as expected! In my case, to get to the "id", we had to go through “ecommerce.purchase.actionField.id”, so I'll just add this here:

10) Now, simply do the same for all the other variables in your Datalayer that are needed in the Awin Conversion Tag!

Privacy

Due to new European legislation regarding how websites store information about you, AWIN is updating its privacy policy. You can see the new version of our policy here. If you would like to see the information we capture on this website, please click here for further details. In order to accept cookies on this site please click the 'I ACCEPT' button