remarketing - fetch page values dynamically?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
We want to implement Google re-marketing on our nopCommerce 3.5 site www.northseaworkwear.com .  There is no plugin that will do the job.  

We already included the Google re-marketing code in our footer which works.  The only problem was that it is static code i.e the re-marketing was based on one product and didn't change based on a user input.

To come up with a dynamic solution I need to add some code to the product pages which fetches 3 values dynamically and display the values with in the rest of the Google code.  

Google re-marketing code is looking for these 3 items :

ecomm_prodid: 'REPLACE_WITH_VALUE',
ecomm_pagetype: 'REPLACE_WITH_VALUE',
ecomm_totalvalue: 'REPLACE_WITH_VALUE',

here is a screen grab from Google to what they represent.

http://i.stack.imgur.com/OTfyM.png


Checking the nopCommerce sources at:  https://nopcommerce.codeplex.com/SourceControl/latest#src/Presentation/Nop.Web/Models/Catalog/ProductDetailsModel.cs

--> the ProductDetailModel has a submodel AddToCartModel which in turn has a member ProductId.

I am trying this :

ecomm_prodid:'<%#this.AddToCart.ProductId%>';

ecomm_totalvalue:'<%#this.ProductPrice.Price%>';


When I tried the above and viewed code for a product page...  I see the text <%#this.AddToCart.ProductId%>  instead of a number.  
(e.g. sample product page... view source... at the very end of document you can see the code http://northseaworkwear.com/dewalt-apprentice-honey-sb-safety-boot-work-boots- )

I'm not 100% sure if <%#this.AddToCart.ProductId%> is the correct thing to retrieve Product ID but it doesn't display a number so maybe I am going about it wrong.

Any ideas ?
9 years ago
In your product template view (e.g. ProductTemplate.Simple), can't you use @Model.AddToCartModel.ProductId instead of using the <%# %> tags you're using?

Another idea would be to take a look at the Google Analytics plugin that NopCommerce provides.  In the eCommerce part of the script, it's dynamically adding the details from the order (including product data).
9 years ago
Hi,
There is another post. I have implemented remarketing in the Google Adwords plugin of somebody else. See other post. It keeps track of purchase etc. However, the tags did not validate well at Google and Google did not know how it was implemented. That was in january or february. Maybe now the implementation is different. I will sent you PM of our site, you can see if tags are well formed there.
J.
9 years ago
Hi !

thank you very much for replying and sending me on the URL !

I checked a product page on that site and it is just what I am looking for !

on a sample product page it has :

<!-- Google Code for Remarketing Tag -->
<script type="text/javascript">
var google_tag_params = {
ecomm_pagetype: 'product',
ecomm_pcat: 'XXXXXXX',
ecomm_prodid: ['1'],
ecomm_pval: 349,
ecomm_totalvalue: 349
};


(I removed value pcat and put in XX).  I see prodid, totalvalue and pagetype

How did you get it to work ?

EDIT we are running nopCommerce 3.40............I changed that Google Adwords Plugin ver 3.3 to 3.4 in the description file and I got it on nopCommerce BUT it wouldn't installed when listed in plugin's ... said there was an internal error.  Is there much of a difference between 3.3 and 3.4 ?
9 years ago
ron.richardson wrote:
In your product template view (e.g. ProductTemplate.Simple), can't you use @Model.AddToCartModel.ProductId instead of using the <%# %> tags you're using?

Another idea would be to take a look at the Google Analytics plugin that NopCommerce provides.  In the eCommerce part of the script, it's dynamically adding the details from the order (including product data).



I added @Model.ProductPrice.Price and it wouldn't load the page –  I had to remove it - it said I got an internal error.

I tried @Model.AddToCartModel.ProductId and got a similar internal error message
9 years ago
Hi,

You can install our plugin if you like. I can however, not provide a lot of support on it since we currently do not use it..and my (unpaid) time is limited. I therefor asked the original maker of the plugin to have a look at my source code and try to integrate it.

J.
9 years ago
Quantis001 wrote:
Hi,

You can install our plugin if you like. I can however, not provide a lot of support on it since we currently do not use it..and my (unpaid) time is limited. I therefor asked the original maker of the plugin to have a look at my source code and try to integrate it.

J.


Hi,

I can understand your time is limited !  I don't know how to get re marketing code to work.  Was it done with that plugin ?


I am only looking for 3 lines to be generated dynamically.
9 years ago
Hi,

I was sent some files but I have been unable to get the ad words plugin to work - i got a lot of errors when I uploaded the adword plugin sent to me.

do you think anyone is working on it ?
9 years ago
Hi,

I have not had feedback from the original Adword developer. I sent you my code. I update all my references through nuget at times. So that might be the problem. I have a serious problem in the shopping cart for which I need to install a default nop installation.

If you could develop I could exchange some of my work to you and have a look. I have an income to make :-(.

J.
9 years ago
hi,

yes thanks for the code.  I will check the references in the plugin and get back to you !

Would this be of any help - to check that the plugin has been put together properly or maybe its a coding problem ?

https://www.youtube.com/channel/UCXtKiwY4dexAC73KdGqdzIA
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.