javascript - Angulartics GA events not getting tracked -
I am using it in my project I have set it as a docs. In its reality, events are not being tracked and tracked by everyone. Here is my code:
See:
// is not tracking & lt; a href = "#" ng-click = "download ()" analytics-on = "click" analytics-event = "download" & gt; Push & lt; / A & gt; index.html
& lt ;! - Enter your GOOGLE analysis code below - & gt; & Lt; Script src = "vendor / angular / angulartics.js" & gt; & Lt; / Script & gt; & Lt; Script src = "vendor / angular / angulartics-ga.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; (Function (I, S, O, G, R, A, M) {i ['GoogleAnalyticsObject'] = R; I [R] = I [R] || function () {(I [R]. C = I [r] .q || []). Push (logic)}, I [R] .l = 1 * new date (); a = s.create element (o), m = s.getElementsByTagName (o) [0]; a.async = 1; a.src = g; m.parentNode.insertBefore (a, m)}) (window, document, 'script', '// www.google-analytics.com/analytics. Js', 'ga'); GA ('Create', 'XXXXXXXX', 'Auto'); Ga ('Send', 'Event', 'Button', 'Click', 'Navi Button', 4); & Lt; / Script & gt; The download event is not trackable but what I added to the script tag is being tracked on the same button button
ga ( 'Send', 'event', 'button', 'click', 'nav buttons', 4); // This track is being tracked Event tracking is not working even from within the application logic when I am doing the following from my controller:
$ analytics .eventTrack ('Downalod'); I also came to know which was the only problem.
Browser used: Chrome version 37.0.2062.120 (64-bit)
Am I missing here? Do I need to enable event tracking or something in the code ??
I had only one problem so I was going on recent commitments and found it in the change log: Google Analytics - There is no event category (required) if nothing should correct it:
& lt; a href = "#" ng-click = "download ()" analytics-on = "click" analytics-category = "some category" analysis-event = "download" & gt; Push & lt; / A & gt;
Comments
Post a Comment