I was wondering if someone could point me in the right direction. We are running an .NET e-commerce website via nopCommerce 3.5 and would like to enable Google remarketing code fully. We included the Google remarketing code BUT it is static - i.e we put it in on the header of the site and it works - its in every page BUT it is hard coded and refers to a single item on our site.
I am trying to work out how to make the remarketing code dynamic. I.e each page would fetch its own values dynamically via .NET or SQL.
Google remarketing code is looking for:
ecomm_prodid: 'REPLACE_WITH_VALUE',ecomm_pagetype: 'REPLACE_WITH_VALUE',ecomm_totalvalue: 'REPLACE_WITH_VALUE',How would I get each product page to retrieve 3 values and place them on the product page instead of REPLACE_WITH_VALUE? (Even if its only one - the product ID)?

We have an awful lot of products on our site, but maybe I could manually code in the best sellers. I don't know to go about this problem. Any help is much appreciated.
Looking at the nopcommerce code on CodePlex, the ProductDetailModel has a submodel AddToCartModel which in turn has a member ProductId. You should be able to use this field to fill you GA variable with it, like this: ecomm_prodid:'<%#this.AddToCart.ProductId%>';. The same should apply to the price, using ecomm_productvalue:'<%#this.ProductPrice.Price%>';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With