angularjs - Angular and Google tag manager (GTM) gtm.click -


i running problem, , cannot seem find fix it. situation follows marketing department wants integrate gtm. fine want have full control on different third party providers wish integrate. happen have ability track clicks on page.

and came me no click events being tracked current configuration within gtm. @ first thought events not propagating (bubbling) upwards. having tested myself binding event listener document (click) (see below) div, buttons etc. ng-click directives did reach handler without problems.

document.addeventlistener("click", function(event){     console.dir(event.target); }); 

so assumption there wrong configuration after looking @ configuration (one created myself looks follows):

enter image description here

i still not work. buttons use angulartics - https://luisfarzati.github.io/angulartics/ send event gtm container work expected:

<a href="file.pdf" analytics-on="click" analytics-event="download">download</a> 

only catch click events (or filter on purely looking @ button clicks) not. after looking @ little more seems gtm expects gtm.click _event happen. can't figure out (gazing through gtm.js file) how bind click events within document (there click binding on document after initialization unsure if gtm or angular). , if have placed many breakpoints within file seemingly related none of them triggered when clicked.

so question is, has got experience combining angularjs angulartics , gtm while having catch click/touch/mousedown etc. events , send these gtm?

make sure pusblished gtm container after made changes. use "publish now" or "preview , debug" buttons inside of gtm interface(top-right corner). because according tag config tag should fire every time when user clicks on website.

regarding "gtm.click" - gtm-event fire every time, when user clicks on website. on screenshot may see, how looks in gtm debug mode("preview , debug") when user clicking on somethig @ web-page, when gtm click listener turned on(like in tag).

enter image description here

may relevant articles website tracking of buttons/links on gtm too:

http://konygin.net/gtm/tracking-links-en/

http://konygin.net/gtm/tracking-buttons-en/


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -