Jump to content

Dynamic Remarketing Google AdWords - variable


thefrux

Recommended Posts

Hello,

 

I want to add to presta Google Dynamic Remarketing Tag. I have problem with one variable. But I will explain it all.

Here is instruction from Google: https://support.goog...r/3103357?hl=pl

I run retail shop so in Google Support it would be those three varaibles: 

ecomm_prodid "1234" ID allows the dynamic ad to show people the exact product they viewed.

ecomm_pagetype "home, searchresults, category, product, cart, purchase, other" Page type indicates which pages people visited. 

ecomm_totalvalue "49.99" Total value is the value of the product. On "cart" pages with multiple products, total value is the sum of all items.

 

Here is my remarketing tag.

<!-- Kod tagu remarketingowego Google -->
<!--------------------------------------------------
Tagi remarketingowe nie mogą być wiązane z informacjami umożliwiającymi identyfikację osób ani umieszczane na stronach o tematyce należącej do kategorii kontrowersyjnych. Więcej informacji oraz instrukcje konfiguracji tagu znajdziesz tutaj: http://google.com/ads/remarketingsetup
--------------------------------------------------->
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: 'REPLACE_WITH_VALUE',
ecomm_pagetype: 'REPLACE_WITH_VALUE',
ecomm_totalvalue: 'REPLACE_WITH_VALUE',
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxx;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/945749977/?value=0&guid=ON&script=0"/>
</div>
</noscript>

I add code in .tpl files.

In first variable I am using $product->reference regarding to my Google Merchant Center XML file. you can also use "$product->id". 

I add second variable permanently. But because of that I need to add code in every tpl file. Probably It can be done by adding code only in footer.tpl but I dont know how.

And last variable - price. I cant find gross price without currency. I found "$product->price",  but it is net price.

Anybody know how I can find price with tax on product page? 

 

Here is my code.

var google_tag_params = {
ecomm_prodid: '{/literal}{$product->reference}{literal}',
ecomm_pagetype: 'product',
ecomm_totalvalue: '{/literal}{literal}',
};

Będę wdzięczny za wszelką pomoc.

Edited by thefrux (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...