robertpol Posted April 18, 2014 Share Posted April 18, 2014 Hello, I have problem with PerfectAudience.com tag code. I use Prestashop 1.5.6.2. and try 3 variables Prestashop product ID in tag, but none work good. This is a tag code: <script type="text/javascript">(function() {window._pa = window._pa || {};// _pa.orderId = "myOrderId"; // OPTIONAL: attach unique conversion identifier to conversions// _pa.revenue = "19.99"; // OPTIONAL: attach dynamic purchase values to conversions// _pa.productId = "myProductId"; // OPTIONAL: Include product ID for use with dynamic adsvar pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;pa.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + "//tag.perfectaudience.com/serve/534b9ba24748cd4a51000046.js";var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pa, s);})();</script> For good work I must put "myProductId". At the moment I try 3 variables (but nothing work): $product.id_product {$product.id_product} {$product->id|intval} Anybody have idea what variable I must use? Link to comment Share on other sites More sharing options...
robertpol Posted April 19, 2014 Author Share Posted April 19, 2014 up Link to comment Share on other sites More sharing options...
Dh42 Posted April 19, 2014 Share Posted April 19, 2014 You cannot just include that code, you would have to make an override that supplied the information needed for the code. Link to comment Share on other sites More sharing options...
chris0241 Posted January 21, 2015 Share Posted January 21, 2015 What do you mean dh42? Link to comment Share on other sites More sharing options...
vekia Posted January 21, 2015 Share Posted January 21, 2015 he means that these variables must be defined in controller, only then you will be able to used them. everything depends on WHERE you want to add this js snippet code. Link to comment Share on other sites More sharing options...
chris0241 Posted January 22, 2015 Share Posted January 22, 2015 Hi Vekia, I'm just using their (Perfect Audience's) module, following instructions that they say used to work? Do I need to do something else too? Thanks, chris http://www.PROtastic.co.uk Link to comment Share on other sites More sharing options...
IeM Posted February 9, 2015 Share Posted February 9, 2015 I need to add this script in a multi-store as well so am keen to see the best way to get it working. My theme allows me to add JS scripts for each shop which is a start as each shop has a different Code ID. So have to work out how to set the JS variables. Link to comment Share on other sites More sharing options...
chris0241 Posted February 13, 2015 Share Posted February 13, 2015 Vekia... any further advice? Perfect Audience themselves are unable to help and I've waited patiently for weeks for their (un)tech support! Link to comment Share on other sites More sharing options...
Recommended Posts