Having trouble inserting a pretty simple tracking code into each product page.
I am not having any luck pulling the SKU from the product page to populate the product_id
(see below).
I am attempting to do so via a widget - which may be causing an issue, though I have inserted code this way before.
<script type="text/javascript">
var sidecar = sidecar || {};
sidecar.product_info = {
product_id: '1234'
};
</script>
Any idea on what code to use so '1234'
will dynamically populate with our SKU? Also, product id would be an acceptable substitute if, for whatever reason, it's easier to do so.