google tag manager - GTM V2 DataLayer button click tracking -


on webpage have 3 button ( ,average, bad). want track how many times particular button click. want use custom dimension , custom metric track in below format

button name    no.of time button click             5 average          10 bad              5 

i have created custom dimension, datalayer variable (in gtm v2), custom metric. not able write datalayer code (datalayer creation & datalayer push method) code track counts how many time particular button clicked not developer or coder . can please me code of datalayer can paste/code on webpage click value button passed custom metric have created. datalayer name have created in gtm v2 bottonclicktotrack. need define event same.

you don't need insert datalayer accomplish you're asking. can, believe there easier way.

1) set 3 triggers, 1 each button. make each button fire when respective button clicked

2) set 3 tags, 1 each button. make each tag send event ga account following information. category : button action : click label : good/average/bad

this way able view button clicks in google analytics , sort them label see 1 clicked more. if have questions implementation please comment , post full detailed solution. if request full detailed solution, see html code buttons. need see

<button id='?' class='?'>button text</button>


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -