Product Level Tracking
  • 24 Sep 2024
  • Dark
    Light

Product Level Tracking

  • Dark
    Light

Article summary

Product Level Tracking enables an advertiser to produce much more in-depth reporting where the performance of individual products can easily be measured.

From an implementation perspective, as long as you are already utilising the MasterTag, it is as simple as adding a hidden HTML form element to the confirmation page that contains individual rows in a specific format outlining which products are included in the order.

The declaration of Product Level Tracking must be done before the MasterTag loads!

The basket parameter values must not contain pipes, as those are used as delimiter


Template part 1 - Start of PLT declaration

<form style="display:none;" name="aw_basket_form">
<textarea wrap="physical" id="aw_basket">


Template part 2 - Product row

AW:P|{{advertiserId}}|{{orderReference}}|{{productId}}|{{productName}}|{{productItemPrice}}|{{productQuantity}}|{{productSku}}|{{commissionGroupCode}}|{{productCategory}}
  • {{advertiserId}} must be replaced by the applicable Awin advertiser programme ID. Consult your account contact or assigned integrator if in any doubt

  • {{orderReference}} must be replaced by the unique booking / order reference

  • {{productId}} must be replaced by the applicable product ID (which must be unique)

  • {{productName}} must be replaced by the applicable product name

  • {{productItemPrice}} must be replaced by the price for a single quantity of this product. This “single unit” price must reflect the price after any relevant discount is applied but prior to any taxes or additional charges are applied. The value must be a float, no thousand separator is allowed and finally the decimal place has to be a standard dot character, for example: "1083.29"

  • {{productQuantity}} must be replaced by the number of the unique product purchased in the same order, for example: "1"

  • {{productSku}} is optional but can be used to record the product's SKU, otherwise leave it blank

  • {{commissionGroupCode}} must be replaced by the commission group code the product in question belongs to, which additionally has to match the breakdown you will have declared in AWIN.Tracking.Sale.parts. If you do not map products to specific commission groups, or you're an Awin Access client, then populate with a static "DEFAULT"

  • {{productCategory}} is optional but can be used to record the category the product belongs to, otherwise leave it blank

File:Information.png

Each product row must be terminated by a line break, more specifically "\r\n".


Template part 3 - End of PLT declaration

</textarea>
</form>


Example #1 - HTML form elements

<form style="display:none;" name="aw_basket_form">
<textarea wrap="physical" id="aw_basket">
AW:P|1001|AA000006|B000EMSUQA|The Knife – Silent Shout|5.55|2|B000EMSUQA|CD|Electronic Music
AW:P|1001|AA000006|B001N2Z41Y|Sigur Ros - Heima|14.99|1|B001N2Z41Y|DVD|Music DVD
</textarea>
</form>


Example #2 - JavaScript append

var awProductsForm = document.createElement("form");
awProductsForm.name = "aw_basket_form";
awProductsForm.setAttribute("style", "display: none;");
document.getElementsByTagName("body")[0].appendChild(awProductsForm);
var awProductsTextArea = document.createElement("textarea");
awProductsTextArea.id = "aw_basket";
awProductsTextArea.wrap = "physical";
/*** sProductData in this example contains the correctly formatted product lines ***/
awProductsTextArea.value = sProductData; 
/*** Each line must be terminated by a line break, more specifically "\r\n" ***/
document.aw_basket_form.appendChild(awProductsTextArea);


Example Requests

If Product Level Tracking, as well as the Mastertag and the Conversion Tag, all have been implemented correctly then tracking requests similar to the below will be made.

https://www.awin1.com/basket.php?product_line=AW%3AP%7C1001%7CAA000006%7CB000EMSUQA%7CThe%20Knife%20-%20Silent%20Shout%7C5.55%7C2%7CB000EMSUQA%7CCD%7CElectronic%20Music
https://www.awin1.com/basket.php?product_line=AW%3AP%7C1001%7CAA000006%7CB001N2Z41Y%7CSigur%20Ros%20-%20Heima%7C14.99%7C1%7CB001N2Z41Y%7CDVD%7CMusic%20DVD

File:Information.png

Depending on your advertiser programme's set up, you could see tracking requests being directed towards our alternative tracking domain zenaps.com.

PLT for noscript and S2S

IMPORTANT: The Image pixel will break on character lengths longer than ~7500 (2048 for IE11) so this version must no be used for extra-huge basket sizes with long product names. In general ~ 40-60 products should be OK, depending on article name an description length. You should save characters by URL-encoding just the array values, but not the array separator pipe. Pixels with a http header size bigger 8kb will be rejected.

As an alternative, for conversion pixels (S2S and fallback, refer to the topic Fall-back Conversion Pixel), it is possible to declare Product Level Tracking within the pixel's URL request string.

Do this by populating each "product row" of above HTML basket form as an entry to the array bd. Each product needs to be transmitted as one single GET query parameter. The parameter names are &bd[0]=&bd[1]=&bd[2]=&bd[3]=... . The array - which will be the parameter value - must be URL encoded. The separator pipes inside the single parameter value may be encoded, but also can be left unencoded to avoid reaching the charcter limit.

Example: &bd[0]=AW:P|advertiserId|orderref_encoded|productid_encoded... or &bd[0]=AW%3AP%7CadvertiserId_encoded%7Corderref_encoded%7Cproductid_encoded...


Template - Fall-back Conversion Pixel and S2S

&bd[0]=AW:P|{{advertiserId}}|{{orderReference}}|{{productId}}|{{productName}}|{{productItemPrice}}|{{productQuantity}}|{{productSku}}|{{commissionGroupCode}}|{{productCategory}}&p1={{customParameter1}}&p2={{customParameter2}}
  • Non numerical values must be URL-encoded, or the whole array (~query parameter value) must be URL encoded.

  • &bd[0]= is an array and should be sequential for extra products. e.g. &bd[0], &bd[1], &bd[2]

  • {{advertiserId}} must be replaced by the applicable Awin advertiser programme ID. Consult your account contact or assigned integrator if in any doubt

  • {{orderReference}} must be replaced by the unique booking / order reference. The parameter value has to be URL-encoded.

  • {{productId}} must be replaced by the applicable product ID (which must be unique). The parameter value has to be URL-encoded.

  • {{productName}} must be replaced by the applicable product name. The parameter value has to be URL-encoded.

  • {{productItemPrice}} must be replaced by the price for a single quantity of this product. This “single unit” price must reflect the price after any relevant discount is applied but prior to any taxes or additional charges are applied. The value must be a float, no thousand separator is allowed and finally the decimal place has to be a standard dot character, for example: "1083.29"

  • {{productQuantity}} must be replaced by the number of the unique product purchased in the same order, for example: "1"

  • {{productSku}} is optional but can be used to record the product's SKU, otherwise leave it blank. The parameter value has to be URL-encoded.

  • {{commissionGroupCode}} must be replaced by the commission group code the product in question belongs to, which additionally has to match the breakdown you will have declared in AWIN.Tracking.Sale.parts. If you do not map products to specific commission groups, or you're an Awin Access client, then just populate with a static "DEFAULT"

  • {{productCategory}} is optional but can be used to record the category the product belongs to, otherwise leave it blank. The parameter value has to be URL-encoded.

  • {{customParameter1}} should be replaced by the first value to be associated with the transaction in question

  • {{customParameter2}} should be replaced by the second value to be associated with the transaction in question


Example multiple products

&bd[0]=AW:P|{{advertiserId}}|{{orderReference}}|{{productId}}|{{productName}}|{{productItemPrice}}|{{productQuantity}}|{{productSku}}|{{commissionGroupCode}}|{{productCategory}}&bd[1]=AW:P|{{advertiserId}}|{{orderReference}}|{{productId}}|{{productName}}|{{productItemPrice}}|{{productQuantity}}|{{productSku}}|{{commissionGroupCode}}|{{productCategory}}&bd[2]=AW:P|{{advertiserId}}|{{orderReference}}|{{productId}}|{{productName}}|{{productItemPrice}}|{{productQuantity}}|{{productSku}}|{{commissionGroupCode}}|{{productCategory}}&p1={{customParameter1}}&p2={{customParameter2}}


Example

<img border="0" height="0" src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=1001&amount=26.09&ch=aw&parts=CD:11.10|DVD:14.99&ref=AA000006&testmode=0&bd[0]=AW:P|1001|AA000006|B000EMSUQA|The Knife – Silent Shout|5.55|2|B000EMSUQA|CD|Electronic Music&bd[1]=AW:P|1001|AA000006|B001N2Z41Y|Sigur Ros - Heima|14.99|1|B001N2Z41Y|DVD|Music DVD" style="display:none;" width="0">


Was this article helpful?