We are putting an script for affiliate tracking on our "Thanks for your order" page.
The script sets witch affiliate network got the last cookie, to win.
We added different scripts in the right way in this code
<script type="text/javascript">
// Tracking pixel switch
$fromNetwork = $_COOKIE['network'];
$pixels = array(
'xmart' => '<img src="[login to view URL][%sum_excl:priceformat(2)%]&order_id=[%sys_id%]&type=sale" width="1" height="1" />',
'tradetracker' => '<img src="[login to view URL]{conversionType}&https={https}&transactionID=[%sys_id%]&transactionAmount=[%sum_excl:priceformat(2)%]&email={email}&descrMerchant={descrMerchant}&descrAffiliate={descrAffiliate}" width="1" height="1" border="0" alt="" />',
'tradedoubler' => '<IMG SRC="[login to view URL][%sys_id%]&orderValue=[%sum_excl:priceformat(2)%]¤cy=SEK" width=1 height=1 />',
'zanox' => '<img width="1" height="1" src="[login to view URL][[0]]&OrderID=[%sys_id%]&CurrencySymbol=[[SEK]]&TotalPrice=[%sum_excl:priceformat(2)%] /">',
'affilired' => '< **affilireds script to be put in here in the right way />',
'adtraction' => '<img width="1" height="1" src="[login to view URL][%sum_excl:priceformat(2)%]&c=SEK&ti=[%sys_id%]&tp=95346540&trt=4&ap=95346531" />'
);
if (isset($pixels[$fromNetwork]))
{
echo $pixels[$fromNetwork];
}
else
{
// In case the cookie is deleted, display all pixels
foreach ($pixels as $pixel)
{
echo $pixel . "\n";
}
}
</script>
But, we need help to add this code in the right way in the script above,
Affilired to add correct above:
<script type="text/javascript">
var adJsHost = (("https:" == [login to view URL]) ? "https://" : "http://");
[login to view URL](unescape("%3Cscript src='" + adJsHost + "[login to view URL]'type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var orderRef = '[%sys_id%] PRODUCT_NAME'; /* You MUST keep the blank space */
var payoutCodes = '';
var offlineCode = '';
var uid = '';
var htname = '';
var merchantID = 3916;
var pixel = 0;
var orderValue = [%sum_excl:priceformat(2)%];
var checkOutDate = '';
var currencyCode ='SEK';
</script>
<script type="text/javascript" src="[login to view URL]">
</script>
<script type="text/javascript">
recV3 (orderValue , orderRef, merchantID, uid , htname, pixel, payoutCodes, offlineCode,checkOutDate,currencyCode)
</script>
<script type="text/javascript">
var campaignId ="180784";
var scriptId ="1314346283759";
</script>
File added in the project