I need a little help capturing product ids.
I have this tracking code (below) running on my site. I successfully set it up to capture the order number and the order total (see below.) There is third option, product ID. I can' figure out how to capture it. This is the id of whatever item they are looking at. It will be used to create retargeting ads.
ORDER NUMBER
<?php echo $zv_orders_id; ?>
ORDER TOTAL
<?php echo $orders->fields['order_total']; ?>
PRODUCT ID NEEDED
The code inserted on every page is below. Any help would be appreciated.
Tom
<script type="text/javascript">
(function() {
window._pa = window._pa || {};
// _pa.orderId = "<?php echo $zv_orders_id; ?>"; // OPTIONAL: attach unique conversion identifier to conversions
// _pa.revenue = "<?php echo $orders->fields['order_total']; ?>"; // OPTIONAL: attach dynamic purchase values to conversions
// _pa.productId = "myProductId"; // OPTIONAL: Include product ID for use with dynamic ads
var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
pa.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + "//tag.perfectaudience.com/serve/xxxxxxxxxxxxxxxxxxxxx.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pa, s);
})();
</script>
Bookmarks