Uitleg: conversiepixel implementeren in Google Tag Manager

In this instruction you will read how to implement the Daisycon Conversion Pixel with Google Tag Manager (GTM). There are different scenarios for the implementation. Choose your scenario below and follow the steps.

  1. You know how to use GTM and/or have used it before. There is a Data Layer available on the website and the order information is available as variables in GTM.
  2. You are not familiar with GTM, but there is a Data Layer available on the website.
  3. You are new to GTM and everything needs to be set-up.

Scenario 1: 

  • Create a new Tag in the menu item 'Tags'
  • Choose the setting: 'Custom HTML Tag'
  • Add the following script to the tag, replace the XXXXX for your Campaign ID
  • Add available variables in the conversion pixel. See our table for more information about the variables

Note: In the script below we have used an example name for the variables. For every website and every Google Tag Manager workspace, it is possible that the variables have different names. This does not change the way to implement it.

<!-- START PIXEL CODE //-->
<img src='https://lt45.net/t/?ci=XXXXX&ti={{transaction-id}}&a={{amount}}&r={{revenue}}&cc={{compensation-code}}&pn={{product-name}}&iv={{internal-value}}' style='border: 0px; height: 1px; width: 1px;' alt='Daisycon Affiliate Marketing' />

<script type="text/javascript">
(function(d){var a,b,c;if(/comp|inter|loaded/.test(d.readyState)){return _a();}d.addEventListener('DOMContentLoaded', _a);function _a(){setTimeout(function(){a=d.getElementsByTagName('img');for(b=0;b<a.length;b++){try{if(/[s|c]i=/i.exec(a[b].src)&&(!a[b].offsetHeight||a[b].offsetHeight<1)){c=d.createElement('img');c.height=c.width=1;c.id='news';c.className='net';c.src='//'+Math.round(+new Date()/83000)+'.'+c.id+'tat.'+c.className+'/ab/'+a[b].src.substring(a[b].src.indexOf('?'),a[b].src.length)+'&v3';d.body.appendChild(c);}}catch(e){}}},100)}})(document);
</script>
<!-- END PIXEL CODE //-->


After adding the Conversion Pixel tag, you should add a trigger.

  • Add a 'Trigger' to the tag.
  • Trigger Type: Page View - DOM Ready
  • Make sure the trigger fires at the 'Thank You' or 'Success' page. For example by adding a 'Page URL' => 'contains' => 'success'

image.png

Save the tag and the trigger and publish your edited workspace. After publishing, please contact your channel manager for testing the conversion pixel.

Scenario 2 & 3:

To connect transaction information to Google Tag Manager (and the Daisycon conversion pixel) your website should contain a Data Layer. This Data Layer should be present on the 'Thank You' page or 'Success' page of your website. This Data Layer is the source of the data. If you look at the source code of this success page, the Data Layer could look like this:

<script>
dataLayer = [{
    "transaction-id":"12345",
    "description":"order from webshop",
    "amount":"19.99",
    "compensation-code":"12345 / abcdef";
}];
// This is just an example!
</script>
  • Create a new Data Layer if necessary (more information about this)
  • Follow all the steps from Scenario 1 if the variables already exist
  • If the variables do not exist please create them following below example

Creating variables

Check if the mandatory variables are available in your GTM workspace. If not, add the missing variables. You can read here how to add additional variables to your GTM workspace.

 

 

variable

example variable names

mandatory

description

example

ci

campaign-id

yes

see campaign-id's below

12345

ti

transaction-id

yes

order number

12345

pn

product-name

yes

description for publisher

order from webshop

iv

internal-value

no

description only for advertiser

order from webshop

a

amount

yes

total amount excl. shipping cost

19.99

r

revenue

yes

total amount excl. shipping cost

19.99

cc

compensation-code

highly recommended

with this field we would be able to meassure different commission groups if required

12345 / abcdef

pr

promotion-code

highly recommended

the promotional code used

promo

c

country

no

country (ISO 3166-1, alpha 2)

NL

z

zipcode

no

zipcode

1314CH

g

gender

no

gender

f

b

birth date

no

year of birth (yyyy)

1984

cur

currency

no

multicurrency support (ISO 4217)

EUR

sku

sku

no

sku

12345 / abcdef

e1

extra1

no

extra variables to enrich the conversion pixel

12345 / abcdef

e2

extra2

no

extra variables to enrich the conversion pixel

12345 / abcdef

e3

extra3

no

extra variables to enrich the conversion pixel

12345 / abcdef

e4

extra4

no

extra variables to enrich the conversion pixel

12345 / abcdef

e5

extra5

no

extra variables to enrich the conversion pixel

12345 / abcdef