For my recent angularJS application, I needed to integrate Mixpanel.
I didn’t found any light-weight directives which I could include in the application that would allow me to easily track events using Mixpanel in the application, so I built Mixular.
Mixualr is a lightweight angularJS directive which you can use to track events in your application.
You can install mixular via bower
bower install mixular
Or you can clone the repo from Github
How to use it
angular-mixular-directive.js in your index.html
Then add mixular dependency in your AngularJS application:
var app = angular.module(“yourApp”, [“mixular-directive”]);
Once you have added the dependency, you can start tracking events in your application, e.g:
Add the property
mixular and specify the events on which you want to trigger the tracking, supported event types are:
eventLabel can be used to specify a label for the event e.g “Banner Ad clicked”.
To pass multiple properties for a event you can type the keyword prop followed by the property name e.g
If you have any questions or suggestions regarding the directive, leave them in the comment section below.