Add the dynamic remarketing tag into prestashop - Ecommerce x PrestaShop [ARCHIVE BOARD] - PrestaShop

Jump to content

Photo

Add the dynamic remarketing tag into prestashop

#1

Posted 13 May 2014 - 04:15 PM

mma87

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 109 Active Posts

Hi to all!

google has update new remarketing tag script and I'm tring to integrate it with prestashop.

the prestashop version currently I'm using is 1.4

 

after some tests and I disabled the ccc compression and I insert the code above (that work fine)

  {literal}
  <script type="text/javascript">
var google_tag_params = {
ecomm_prodid: '{/literal}{$product->id|intval}{literal}',
ecomm_pagetype: 'product',
ecomm_totalvalue: '{/literal}{$product->getPrice(true, $smarty.const.NULL, 2)}{literal}',
};
</script>
{/literal}
    
     <script type="text/javascript">
     {literal} 
/* <![CDATA[ */
var google_conversion_id = 995392743;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
google_conversion_format = 3;
/* ]]> */
{/literal}
</script>

{literal}<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>{/literal}
{literal}
<noscript>{/literal}
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/995392743/?value=0&amp;guid=ON&amp;script=0"/>
</div>{literal}
</noscript>
{/literal}

the code have to be insert before the </body> in the footer.tpl

 

you can see an example in this page

 

there is only one problem: ecomm_pagetype is static because I can't find the way to understand using smarty what kind of page the user are visiting.

 

If some one know how to find it, we can improve my solution (in the db there is the table ps_page_type)

 

Matteo


logo-kuboweb_195x60.jpg

siti in prestashop - realizzazione siti internet - sviluppo app - web marketing

www.kuboweb.it


#2

Posted 15 September 2014 - 03:10 PM

Tia©

    PrestaShop Apprentice

  • Members
  • PipPip
  • 47 Active Posts

Hi,

have you found a solution about the page type?


Prestashop 1.5.6.1

 

<?xml version="1.0" encoding="UTF-8" ?><module><name>Tia</name></module>


#3

Posted 15 September 2014 - 03:22 PM

mma87

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 109 Active Posts

yep!

 

chage the line 5 whit this code:

ecomm_pagetype: '{/literal}{if $page_name eq "index"}home{elseif $page_name eq "category"}category{elseif $page_name eq "product"}product{else}other{/if}{literal}',

Matteo


logo-kuboweb_195x60.jpg

siti in prestashop - realizzazione siti internet - sviluppo app - web marketing

www.kuboweb.it


#4

Posted 15 September 2014 - 03:42 PM

Tia©

    PrestaShop Apprentice

  • Members
  • PipPip
  • 47 Active Posts

Thank you very much, i am watching also this topic http://www.prestasho...-prestashop-15/

 

Scrivo in inglese e probabilmente siamo due italiani :D


Prestashop 1.5.6.1

 

<?xml version="1.0" encoding="UTF-8" ?><module><name>Tia</name></module>


#5

Posted 15 September 2014 - 04:10 PM

mma87

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 109 Active Posts

you're welcome!

 

si, siamo due italiani ;)


logo-kuboweb_195x60.jpg

siti in prestashop - realizzazione siti internet - sviluppo app - web marketing

www.kuboweb.it


#6

Posted 02 December 2015 - 02:05 PM

Mizi91

    PrestaShop Newbie

  • Members
  • Pip
  • 8 Active Posts

Thank you for your solution. I get error 500 after changing it in my footer.tpl

 

Anyone experienced same problem?



#7

Posted 02 December 2015 - 03:19 PM

mma87

    PrestaShop Enthusiast

  • Members
  • PipPip
  • 109 Active Posts

Thank you for your solution. I get error 500 after changing it in my footer.tpl

 

Anyone experienced same problem?

 

do you use this solution with prestashop 1.4?

 

maybe your issue is with copy-paste?


logo-kuboweb_195x60.jpg

siti in prestashop - realizzazione siti internet - sviluppo app - web marketing

www.kuboweb.it



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cookies help us deliver our services. By using our services, you agree to use our cookies.     Learn more