javascript - How to get values from dataLayer object -
i want values datalayer object of google tag manager. in chrome tag assistance getting values this
[ { "gtm.start": 1503053374849, "event": "gtm.js", "gtm.uniqueeventid": 0 }, { "event": "gtm.dom", "gtm.uniqueeventid": 1 }, { "event": "gtm.load", "gtm.uniqueeventid": 2 }, { "linker": "_ga=53655374" } ]
i need "linker" value. tried datalayer[3].linker
gives me "undefined" or blank same datalayer[1].event
(it's blank not return value = "gtm.dom") when try datalayer[0].event
it's return correct 'gtm.js'
please me how "linker" value
the best way use google tag manager itself, that's it's designed for. this, go gtm interface (tagmanager.google.com) , create variable of type datalayer. can use variable in tag of choosing pass value 3rd party system.
Comments
Post a Comment