Jump to content

Problème google adwords prestashop


Recommended Posts

Bonjour,
j'ai un problème avec la détection des paramètres personnalisé "ecomm_prodid", "ecomm_pagetype", "ecomm_totalvalue", il m'affiche un message (Nous n'avons pas détecté de paramètres personnalisés relatifs au secteur Commerce de détail (AdWords).) malgré que j'ai met le script dans la footre avec les condition {if}{elseif}, et avec l'extension google tag tous pass bien et toujours en vert sur tous les page
voilà le code:
 

{if isset($page_name) &&  !empty($page_name)}
{if $page_name|escape:'html':'UTF-8' == 'index'}
{assign var="page_name" value="'home'"}
{literal}
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: {/literal}0{literal},
ecomm_pagetype: {/literal}{$page_name}{literal},
ecomm_totalvalue: {/literal}0{literal}
};
</script>
{/literal}
{elseif $page_name|escape:'html':'UTF-8' == 'category'}
{literal}
<script type="text/javascript">
{/literal}
{$category=$product.category_default|replace:' ':'_'} {literal}
var google_tag_params = {
ecomm_prodid:[{/literal}{foreach from=$products item=product name=products} {literal}'hspfr{/literal}{$product.id_product|intval}{literal}'{/literal},  {/foreach} {literal} ] ,
ecomm_pagetype: 'category',
ecomm_totalvalue: [{/literal}{foreach from=$products item=product name=products} {$product.price|string_format:"%.2f"},  {/foreach} {literal}]
};
</script>
{/literal}
{elseif $page_name|escape:'html':'UTF-8' == 'order'}
<script type="text/javascript">
{$price=$total_price|replace:'€':''}
var google_tag_params = {
ecomm_prodid: {foreach from=$products item=product name=productLoop}{$product.id_product}{/foreach},
ecomm_pagetype: 'cart',
ecomm_totalvalue: {$price}
};
</script>
{elseif $page_name|escape:'html':'UTF-8' neq 'category' && $page_name|escape:'html':'UTF-8' neq 'product' && $page_name|escape:'html':'UTF-8' neq 'order' && $page_name|escape:'html':'UTF-8' neq 'order-confirmation'}
{assign var="page_name" value="'other'"}
{literal}
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: {/literal}0{literal},
ecomm_pagetype: {/literal}{$page_name}{literal},
ecomm_totalvalue: {/literal}0{literal}
};
</script>
{/literal}
{/if}
{/if}
{literal}
<!-- Code Google de la balise de remarketing N3RD-->
<!--------------------------------------------------
Les balises de remarketing ne peuvent pas être associées aux informations personnelles ou placées sur des pages liées aux catégories à caractère sensible. Pour comprendre et savoir comment configurer la balise, rendez-vous sur la page http://google.com/ads/remarketingsetup.
--------------------------------------------------->
<script type="text/javascript">
 /* <![CDATA[ */
var google_conversion_id = XXXXXXXXX;
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/?guid=ON&script=0"/>
</div>
</noscript>
{/literal}
je besoin de l'aide svp

post-1354125-0-90028300-1484843148_thumb.png

Edited by PR1989 (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...