KO
|
EN
gitlite — search
Search
#hacktoberfest
#machine-learning
#flutter
#api
#javascript
#python
#deep-learning
#dart
#java
#php
#react
#typescript
angular-mixpanel
★ 53
Open GitHub ↗
Mixpanel module for Angular JS
Download README (.md)
Explore Similar Repositories
pmod_transform
:
Parse transform for parameterized modules
pylon
:
A Javascript class system in 100% Clojurescript
scikit-learn-interactive-tutorial
:
IPython notebooks and data an interactive scikit-learn tutorial.
pythonbo
:
The PythonBo's Github repository. For more info visit
drink-menu
:
OSX menus - the ruby way
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
angular-mixpanel
?
Download (.md)
angular-mixpanel ================ Wraps the mixpanel JavaScript global to make it injectable and aid in testing. Installation ------------ Install via bower: `bower install angular-mixpanel` Or if you're old skool, copy `src/angular-mixpanel.js` into your project. Then add the script to your page (be sure to include the mixpanel lib as well): ```html <script src="/bower_components/mixpanel/mixpanel-jslib-snippet.min.js"></script> <script src="/bower_components/angular-mixpanel/src/angular-mixpanel.js"></script> ``` Usage ----- First add the dependency to your app: ```javascript angular.module('myApp', ['analytics.mixpanel']); ``` Minimally you'll need to configure your API key like so: ```javascript angular.module('analytics.mixpanel') .config(['$mixpanelProvider', function($mixpanelProvider) { $mixpanelProvider.apiKey('<your project token>'); // your token is different than your API key }]); ``` You can also supply [super properties](https://mixpanel.com/help/reference/javascript#super-properties): ```javascript angular.module('analytics.mixpanel') .config(['$mixpanelProvider', function($mixpanelProvider) { $mixpanelProvider.apiKey('<your project token>'); // your token is different than your API key $mixpanelProvider.superProperties({ someProp: true, anotherOne: [1,2,3] }); }]); ``` Then you can inject `$mixpanel` wherever needed. The API is identical to the standard mixpanel JavaScript global. For example: ```javascript angular.module('myApp').controller('MyCtrl', function ($scope, $mixpanel) { $mixpanel.track('my event'); }); ``` Issues or feature requests -------------------------- Create a ticket [here](https://github.com/kuhnza/angular-mixpanel/issues) Contributing ------------ Issue a pull request including any relavent testing and updated any documentation if required.