Container Tag Implementation Examples
From Wiki
Contents |
Container Tag Implementation Examples
Cake
Linking
When setting up the program linking you need to request that your Account Manager (or Technical Services) makes sure all affiliate traffic is sent via a the Cake click tracker and that the URL is tagged up in a specific way, namely that !!!awc!!!
is populated to the parameter s1
, !!!id!!!
to s2
, !!!sitename!!!
to s3
, and finally !!!clickref!!!
to s4
.
Example target URL:
http://domain-name.com/?a=NNN&c=NNNN&s1=!!!awc!!!&s2=!!!id!!!&s3=!!!sitename!!!&s4=!!!clickref!!!
Token Set Up
Token Name | Token Label |
#leadid# | Lead ID |
#oid# | Offer ID |
#price# | Payout |
#s1# | Sub ID 1 |
#s2# | Sub ID 2 |
#s3# | Sub ID 3 |
#s4# | Sub ID 4 |
Tracking
Postback URL (S2S):
https://www.awin1.com/sread.php?tt=ss&tv=2&merchant=NNNN&amount=1.00&ch=aw&cr=USD&ref=#leadid#&parts=default:1.00&cks=#s1#
You could alternatively, and if applicable, populate #price#
instead of 1.00
to amount
and in parts
and #oid#
instead of default
in parts
, however remember that the offer ID value must adhere to the Awin commission group code standard.
Doubleclick (DFA)
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=NNNN&amount=%pcost=!;&ch=aw&cr=GBP&ref=%pord=!;&parts=DEFAULT:%pcost=!;&vc=&testmode=0" border="0" height="0" width="0" style="display: none;"> <script type="text/javascript"> var AWIN = {}; AWIN.Tracking = {}; AWIN.Tracking.Sale = {}; AWIN.Tracking.Sale.amount = "%pcost=!;"; AWIN.Tracking.Sale.channel = "aw"; AWIN.Tracking.Sale.currency = "GBP"; AWIN.Tracking.Sale.orderRef = "%pord=!;"; AWIN.Tracking.Sale.parts = "DEFAULT:%pcost=!;"; AWIN.Tracking.Sale.voucher = ""; AWIN.Tracking.Sale.test = 0; </script> <script src="https://www.dwin1.com/NNNN.js" type="text/javascript" defer="defer"></script>
Google Tag Manager
Tag Name: Awin v2 Image Pixel
Tag Type: Custom Image Tag
Image URL:
https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=NNNN&amount={{awinSaleAmount}}&ch=aw&cr={{awinCurrency}}&ref={{awinOrderReference}}&parts={{awinParts}}&vc={{awinVoucherCode}}&testmode=0
Macros
Name | Type | Description |
awinSaleAmount | Data Layer Variable | Data Layer Variable Name: transactionTotal Default Value: 0.00 |
awinCurrency | Data Layer Variable | Data Layer Variable Name: transactionCurrency Default Value: GBP |
awinOrderReference | Data Layer Variable | Data Layer Variable Name: transactionId |
awinParts | Data Layer Variable | Data Layer Variable Name: awinTransactionParts Default Value: DEFAULT:0.00 |
awinVoucherCode | Data Layer Variable | Data Layer Variable Name: transactionPromoCode |
Data Layer Declaration
<script> dataLayer = [{ "transactionTotal": "26.09", "transactionCurrency": "GBP", "transactionId": "AA835852-3", "awinTransactionParts": "CD:11.10|DVD:14.99", "transactionPromoCode": "SPRING13" }]; </script>
Shopify
Please note that while this template was tested and verified with a number of merchants, we cannot guarantee that it covers all possible Shopify implementations and set-ups. Please replace 'MID' with your Merchant ID. We have used variables provided in Shopify's documentation, and their platform functionality may change without our knowledge.
See also: Awin_Access_Technical_Integration_shopify
Need help on Product Feeds? Refer to our Shopify Product Feed guide.
<img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=MID&amount={{subtotal_price|divided_by:1.2|money_without_currency}}&ch=aw&cr={{shop.currency}}&ref={{order_number}}&parts=DEFAULT:{{subtotal_price|divided_by:1.2|money_without_currency}}&vc={{discounts.first.code}}&testmode=0" border="0" height="0" width="0" style="display: none;"> <form style="display: none;" name="aw_basket_form"> <textarea wrap="physical" id="aw_basket"> {%for line_item in line_items%}AW:P|MID|{{order_number}}|{{line_item.product.id}}|{{line_item.title}}|{{line_item.price|divided_by:1.2|money_without_currency}}|{{line_item.quantity}}|{{line_item.sku}}|DEFAULT| {%endfor%} </textarea> </form> <script type="text/javascript"> var AWIN = {}; AWIN.Tracking = {}; AWIN.Tracking.Sale = {}; AWIN.Tracking.Sale.amount = "{{subtotal_price|divided_by:1.2|money_without_currency}}"; AWIN.Tracking.Sale.channel = "aw"; AWIN.Tracking.Sale.currency = "{{shop.currency}}"; AWIN.Tracking.Sale.orderRef = "{{order_number}}"; AWIN.Tracking.Sale.parts = "DEFAULT:{{subtotal_price|divided_by:1.2|money_without_currency}}"; AWIN.Tracking.Sale.voucher = "{{discounts.first.code}}"; AWIN.Tracking.Sale.test = 0; </script> <script src="https://www.dwin1.com/MID.js" type="text/javascript" defer="defer"></script>
Please ensure that the Awin dwin1 tag below appears on all pages across the site. This is typically placed in 'theme.liquid' and in 'cart.liquid', directly above the '</body>' tag:
<script src="https://www.dwin1.com/MID.js" type="text/javascript" defer="defer"></script>
This template is for tracking exclusive of 20% UK VAT and furthermore without delivery charge.
If you want to track inclusive of tax / VAT then just remove all instances of | divided_by:1.2
, however depending on your Shopify settings you might instead want to add on taxes. If that is the case then, for example, replace divided_by:1.2
with times:1.1
to add 10% tax to the price entry.
If you want to include delivery charge replace all instances of subtotal_price
with total_price
, however then please note that you will end up with an obvious discrepancy between transaction and product level reporting.
Multiple discounts codes, if the web shop set up supports it, can be populated to tracking by looping through the discounts
object. In the example below the different discounts code will be inserted pipe separated.
In image pixel URL:
&vc={% for discount in discounts %}{% if forloop.index > 0 %}|{% endif %}{{ discount.code }}{% endfor %}
In JavaScript declaration:
AWIN.Tracking.Sale.voucher = "{% for discount in discounts %}{% if forloop.index > 0 %}|{% endif %}{{ discount.code }}{% endfor %}";
See also:
https://apps.shopify.com/awin-advertiser-tracking
EN: https://help.shopify.com/en/manual/orders/status-tracking/add-conversion-tracking-to-thank-you-page#tracking-pixels
DE: https://help.shopify.com/de/manual/orders/status-tracking/add-conversion-tracking-to-thank-you-page#tracking-pixels
FR: https://help.shopify.com/fr/manual/orders/status-tracking/customize-order-status/add-conversion-tracking
IT: https://help.shopify.com/it/manual/orders/status-tracking/customize-order-status/add-conversion-tracking
NL: https://help.shopify.com/nl/manual/orders/status-tracking/customize-order-status/add-conversion-tracking
PL: https://help.shopify.com/pl/manual/orders/status-tracking/customize-order-status/add-conversion-tracking
ES: https://help.shopify.com/es/manual/orders/status-tracking/customize-order-status/add-conversion-tracking
SE: https://help.shopify.com/sv/manual/orders/status-tracking/customize-order-status/add-conversion-tracking