Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

How to create data layer for Google tag manager

$
0
0

Hi,

I want to create data layer for Google Tag Manager which will be a script with dynamic data in body section of all pages.

window.dataLayer = window.dataLayer||[];

window.dataLayer.push({

           'content.group':    'value', // Content Group

           'content.level1':    'value', // Content Level 1

           'content.level2':    'value', // Content level 2

           'content.pagetype':            'value', // Page Type

           'customer.loginstatus':         'value', // Customer Login Status

           'customer.id':         'value', // Customer ID

           'customer.contracttype':      'value', // Customer Contract Type  

});

Can anyone please explain how can we implement it(through SitePageData etc) with an example.

Thanks in advance.

Best Regards,

Sanket Mahimkar


Viewing all articles
Browse latest Browse all 9076

Trending Articles