Jump to content

How to add Google remarketing tag


sonkaya

Recommended Posts

Hi,

 

I am using 1.6.0.9 

 

I tried to add Google remarketing code into footer.tpl but still couldnt succeed.

 

Google still says can not find the tag in my web page www.sonkaya.com.tr

 

Please help me. The codes in footer.tpl is below.

 

Thanks.

 

 

 
{literal}
 
<!-- remarketing codes -->
 
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 11111111111;
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/967369179/?value=0&guid=ON&script=0"/>
</div>
</noscript>
 
{/literal}
 
</body>
</html>

 

Link to comment
Share on other sites

This answer was given some times. For example latest here: https://www.prestashop.com/forums/topic/441355-google-adwords-remarketing/

 

Add the remarketing tag code

{literal}
 
<!-- remarketing codes -->
 
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = xxxxxx;
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/xxxxxxxxx/?value=0&guid=ON&script=0"/>
</div>
</noscript>
 
{/literal}

(</body> and </html> are not part of the code !!!! so please don't add, cause you are closing Prestashops code not correctly - only the code inherit and inclusive {literal} should be added

 

to your footer.tpl just AFTER the line

{include file="$tpl_dir./global.tpl"}

But before you should activate allow iframes on TAB Preferences -> general -> Allow iframes in HTML code=YES

Edited by selectshop.at (see edit history)
  • Like 2
Link to comment
Share on other sites

Hi,

Yesterday I bought on prestashop the Google Remarketing module  and install it ;; but it doesn't work as i want 

the configuration system ask me an ID ... not a code and when i put the google remarketing tag that google send to me 

here is the error that 's write 

 

[PrestaShop] Fatal error in module file :/htdocs/boutique/modules/googleremarketing/googleremarketing.php:
Call to undefined function boolval()

 

I don't know how to do 

can somebody help me pleaaaaaasssee ;-)

thanks a lot to everybody

Link to comment
Share on other sites

Thank you Prestashop fanatic

 

I've tried what you said ... but it doesn't works yet :-(

Copy paste de html code from litteral to litteral 

I Allowed iframes in HTML code into YES

Do i have to paste the html code in the footer too ? if yes then i don't where i must look to insert it

 

the bought module ask me my ID ...? it 'seems not to be a so long html code ... The only number ( with 9chiffers ) that looks like  as an follow doens't work  too

 

I' m a desperate  :rolleyes:

Link to comment
Share on other sites

Hi, 

 

I have solved the problem:

 

1) I disabled Minify HTML at the advanced setting -->preferences, because it deletes all comments in the javascripts so 

 

/* <![CDATA[ */"  tags dissappears like this /* */

 

2) I added the codes below to the header.tpl (in the themes folder) just before the {$HOOK_HEADER}) 

and disabled move the javascript to the end option at the advanced setting -->preferences

 
{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
    {$js_def}
    {foreach from=$js_files item=js_uri}
    <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
    {/foreach}
{/if}
 
thanks so much.

 

 

  • Like 1
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...