De-duping using Channel Parameter

From Wiki

(Difference between revisions)
Jump to: navigation, search
Marcus Olsson (Talk | contribs)
Facundo Rosales (Talk | contribs)
Line 1: Line 1:
== Introduction ==
== Introduction ==

Revision as of 14:57, 25 April 2014



This feature is the process of attributing a sale to one online marketing channel on predefined conditions, these conditions will decide which channel parameter should be shown within the tracking tag on the confirmation of sale page.

When a merchant runs a specific program on two networks, de-duplication is essential to prevent paying for the same sale twice.

This can occur when a customer has visited a merchant’s site through two different network links and ends up with two different advertising channel cookies on their computer.

Using automatic de-duplication, the merchant only displays the Affiliate Window tracking code with the relevant channel parameter for the network that last referred the customer.

Deduplication Solution

Affiliate Window recommends using a “Click Append”, which is a specific parameter and value pair appended to the relevant traffic, and setting a local cookie on the visitor’s machine when they enter the website.

A local cookie is dropped when the user click on a network link and is stored on the user’s computer. This can be used to recognise the last referring channel and if conditions are put in place by the merchant on the site the relevant tracking tag will display on the sale confirmation page.

This is the most efficient and accurate way to de-duplicate and provides the merchant with complete control over the logic employed.

This method is also referred to as “conditional tagging”.


Merchant X added a click append to their URL for each online channel to define where the customer had arrived from, a few of these are shown below: – Affiliate Window - Tradedoubler – Google PPC – Email campaign

They then wrote a script to place a local cookie on the user’s computer triggered by the presence of the click append.

They then established a rule that the click append source ID would be overwritten on a last referrer basis.

For a customer clicking through via a Tradedoubler Publisher who then browses and returns via an Affiliate Window Publisher the click append source id “?source=td” would be replaced with “?source=aw”.

The tracking tag logic at the sale confirmation page would recognise the “?source=aw” click append and show the Affiliate Window tracking code with the channel parameter as ꞌawꞌ, thus correctly awarding the sale to the last referring network.

All traffic must be tagged to ensure accurate cross-channel de-duplication. The last referrer wins method must be used across all channels to ensure fair de-duping.

Below shows an example PHP script that grabs the click append (?source=aw) information from the URL, sets a cookie for 30 days and displays the Affiliate Window tracking code with the relevant advertising channel.

The below would be placed at the top of your pages to check for the existence of your "source" parameter in the URI.

$cookieLength = 30; // Cookie length in days
if (isset($_GET["source"])) {
    setcookie("source", $_GET["source"], time() + (60 * 60 * 24 * $cookieLength), '/', '.' . $_SERVER['SERVER_NAME']);

The below would be placed on your confirmation page. Remember that all variables will need to be replaced with your website's equivalents.

$awinProgramId = "1001"; // Affiliate Window advertiser program ID
if (isset($_COOKIE["source"])) {
    $channel = $_COOKIE["source"];
} else {
    $channel = "na";
<img border="0" height="0" src=";tv=2&amp;merchant=<?php echo $awinProgramId; ?>&amp;amount=<?php echo $saleAmount; ?>&amp;ch=<?php echo $channel; ?>&amp;cr=<?php echo $currency; ?>&amp;ref=<?php echo $orderReference; ?>&amp;parts=DEFAULT:<?php echo $saleAmount; ?>&amp;vc=<?php echo $voucherCode; ?>&amp;testmode=0" width="0">
<form style="display:none;" name="aw_basket_form">
<textarea wrap="physical" id="aw_basket">
foreach ($products as $product) {
AW:P|<?php echo $awinProgramId; ?>|<?php echo $orderReference; ?>|<?php echo $product["productId"]; ?>|<?php echo $product["productName"]; ?>|<?php echo $product["productUnitPrice"]; ?>|<?php echo $product["productQuantity"]; ?>|<?php echo $product["productSku"]; ?>|DEFAULT|<?php echo $product["productCategory"] . "\r\n"; ?>
<script type="text/javascript">
var AWIN = {};
AWIN.Tracking = {};
AWIN.Tracking.Sale = {};
AWIN.Tracking.Sale.amount = "<?php echo $saleAmount; ?>"; = "<?php echo $channel; ?>";
AWIN.Tracking.Sale.currency = "<?php echo $currency; ?>";
AWIN.Tracking.Sale.orderRef = "<?php echo $orderReference; ?>"; = "DEFAULT:<?php echo $saleAmount; ?>";
AWIN.Tracking.Sale.voucher = "<?php echo $voucherCode; ?>";
AWIN.Tracking.Sale.test = 0;
<script src="<?php echo $awinProgramId; ?>.js" type="text/javascript" defer="defer"></script>


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