angulartics-customerio
v1.0.2
Published
CustomerIO plugin for Angulartics
Downloads
4
Maintainers
Readme
angulartics-customerio
CustomerIO plugin for Angulartics.
Install
First make sure you've read installation and setup instructions for Angulartics.
Then you can install this package either with npm
or with bower
.
npm
npm install angulartics-customerio
Then add angulartics.customerio
as a dependency for your app:
require('angulartics')
angular.module('myApp', [
'angulartics',
require('angulartics-customerio')
]);
bower
bower install angulartics-customerio
Add the <script>
to your index.html
:
<script src="/bower_components/angulartics-customerio/dist/angulartics-customerio.min.js"></script>
Then add angulartics.customerio
as a dependency for your app:
angular.module('myApp', ['angulartics','angulartics.customerio']);
Documentation
- This plugin includes the snippet code provided by Amplitude.
myApp.config(['$analytics_customerioProvider', function($analytics_customerioProvider) { $analytics_customerioProvider.init("Site_ID"); }]);
If needed, you can access the CustomerIO object by injecting '$analytics_customerio'. For instance:
```javascript
myApp.run(['$analytics_customerio', function($analytics_customerio) {
$analytics_customerio.cookieNamespace;
}])
Check CustomerIO documentation for more details.
- Tracking Event, Pages and setting user properties are done through '$analytics' service. This angulartics plugin supports the following analytics calls:
$analytics.pageTrack()
$analytics.eventTrack()
$analytics.setUsernames()
$analytics.setUserProperties()
$analytics.setSuperProperties()
Check Angulartics documentation for more details.
Development
npm install
npm run build