Angulartics - $analytics.eventTrack not firing ga events

1k Views Asked by At

I am trying to track an event on a tag of a drop-down menu. If I use analytics-on in the html directly I am only able to track the click event and not the onchange event.

To work around this, I have a function attached to an ng-change like so: <select ng-change=“sortListView( )”> and a controller based on the documentation:

controller: function($scope, $analytics){ 
  $scope.sortListView = function() { 
    […] 
    $analytics.eventTrack('testTag'); 
  }; 
}

However, the event is not getting picked up by google analytics. Is there any additional implementation required for this to work in my angular app? I've added the scripts and injected angulartics, angulartics.google.analytics dependencies based on the documentation. Declarative event tracking works without a problem, only having issues with $analytics.

0

There are 0 best solutions below