Google tag manager for Prestashop module

PS 1.6 PS 1.5

GTM

Google tag manager module for Prestashop 1.5 and 1.6

899,00 Kč

Google tag manager for Prestashop provides flexible and robust alternative for measuring conversions in Google Analytics.

See there for more informations concerning  tag usage for measuring conversions

Installation: install from provided ZIP archive, enter the GTM code and disable the standard google analytics module (ganalytics)

modify header.tpl by adding {$HOOK_GTAGMANAGER} just after the body tag:

<body{if isset($page_name)} id="{$page_name|escape:'html':'UTF-8'}"{/if} ...>
    {$HOOK_GTAGMANAGER}
    {if !isset($content_only) || !$content_only}

Features:

The google tag manager code is displayed in the following pages

  • homepage
  • checkout
  • product detail
  • order confirmation

The item code is created from product id and optional variant id. Separator between product and variant id can be edited in the module administration

Generated code:

container -header and body of all pages:

<!-- Google Tag Manager -->
<script data-keepinline>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
</head>
<body id="index" class="index hide-left-column hide-right-column lang_cs">
	<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 
<!-- End Google Tag Manager (noscript) -->


datalayer - in header above container:

homepage:
<script>
dataLayer = [{
    'pageType':'homepage'
    }];
</script>
 


product detail:

<script>
dataLayer = [{
    'pageType':'product',
    'productId':'1',
    'productName':'Tričko s krátkým rukávem',
    'productPrice':19.83
    }];
</script>
 

shopping cart:
(id patří prvnímu produktu v pokladně)

<script>
dataLayer = [{
    'pageType':'cart',
    'totalValue':71.83,
    'productId':'1-1'
    }];
</script>


order confirmation:

<script>
dataLayer = [{
    'transactionId': '16',
    'transactionAffiliation': '',
    'transactionTotal': '171.83',
    'transactionTax': '36.09',
    'pageType': 'purchase',
    'transactionShipping': '100',
    'transactionProducts': [
                            {'sku': '11', 'name': 'Tričko s krátkým rukávem - Velikost : S, Barva : Orange', 'category': 'T-shirts', 'price': 19.83, 'quantity': 1},
                           {'sku': '313', 'name': 'Potištěné šaty - Velikost : S, Barva : Orange', 'category': 'Casual Dresses', 'price': 26, 'quantity': 2},
   ]
}];
</script>
 

No customer comments for the moment.

Write a review

Google tag manager for Prestashop module

Google tag manager for Prestashop module

Google tag manager module for Prestashop 1.5 and 1.6

Write a review