Hi,
I’m installing a TradeTracker conversion pixel but the code won’t execute on the succes page.
I’ve tried to add it with the page builder but it doesn’t execute php scripts. Can you advice how to make this work?
Code for the succes page:
<?php
include_once DIR_APPLICATION . '/model/TradeTracker.php';
$ttConversion = new TradeTrackerConversion(
empty($ttOrderID) ? '' : $ttOrderID,
empty($ttSubtotal) ? '' : $ttSubtotal,
'XXXXX',
'XXXXX',
null
);
?>
</div>
Thanks!
|
|
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
|
|
Hi,
It isn’t working. I have an alternative methode (script) but that also isn’t working. Point is that I can paste it in page builder but then the php echo commands won’t work and are not sending the order information to the affiliate.
This is the alternative script we can use, could you assist how to make it work in page builder or manualy?
<script type="text/javascript">
var ttConversionOptions = ttConversionOptions || [];
ttConversionOptions.push({
type: 'sales',
campaignID: 'XXXXXX',
productID: 'XXXXXX',
transactionID: '<?php echo $order_id; ?>',
transactionAmount: '<?php echo $order_total; ?>',
quantity: '1',
email: '',
descrMerchant: '',
descrAffiliate: '',
currency: ''
});
</script>
<noscript>
<img src="//ts.tradetracker.net/?cid=XXXXX&pid=XXXXX&tid=<?php echo $order_id; ?>&tam=<?php echo $order_total; ?>&data=&qty=1&eml=&descrMerchant=&descrAffiliate=&event=sales&currency=EUR" alt="" />
</noscript>
<script type="text/javascript">
(function(ttConversionOptions) {
var campaignID = 'campaignID' in ttConversionOptions ? ttConversionOptions.campaignID : ('length' in ttConversionOptions && ttConversionOptions.length ? ttConversionOptions[0].campaignID : null);
var tt = document.createElement('script'); tt.type = 'text/javascript'; tt.async = true; tt.src = '//tm.tradetracker.net/conversion?s=' + encodeURIComponent(campaignID) + '&t=m';
var s = document.getElementsByTagName('script'); s = s[s.length - 1]; s.parentNode.insertBefore(tt, s);
})(ttConversionOptions);
</script>
|
|
Hi,
PHP wont work in Page Builder, so you will have to either use a pure JS solution or modify the template directly.
Can you try to put the second code snippet in the place we’ve suggested in our first post?
BR,
ThemeBurn team
|
|
In this case PHP doesn’t work in the template either. Thanks for your advise. I’ll look at a JS solution.
BR
John
|
|
Hi,
Please, post your JS solution here after you are done.
Thanks,
ThemeBurn team
|
|