Localytics plugin for Angulartics.
This plugin has no maintainers at the moment. If you use Localytics and want to contribute with code/documentation/examples and become an active maintainer of this project, please let us know.
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 install angulartics-localytics
Then add angulartics.localytics
as a dependency for your app:
require('angulartics')
angular.module('myApp', [
'angulartics',
require('angulartics-localytics')
]);
Please note that core Angulartics doesn't export the name yet, but it will once we move it into the new organization.
bower install gemr/angulartics-localytics
Add this <script>
to your index.html
:
<script>
+function(l,y,t,i,c,s) {
l['LocalyticsGlobal'] = i;
l[i] = function() { (l[i].q = l[i].q || []).push(arguments) };
l[i].t = +new Date;
(s = y.createElement(t)).type = 'text/javascript';
s.src = '//web.localytics.com/v3/localytics.min.js';
(c = y.getElementsByTagName(t)[0]).parentNode.insertBefore(s, c);
ll('init', 'YOUR-LOCALYTICS-APP-KEY', {} /* Options */);
}(window, document, 'script', 'll');
</script>
Then add angulartics.localytics
as a dependency for your app:
angular.module('myApp', [
'angulartics',
'angulartics.localytics'
]);
For user tracking, the angulartics setUsername field must be a user id for localytics. For user properties, localytics accepts an email address and an username only.
$analytics.setUsername(userId)
$analytics.setUserProperties({ email: EMAILADDRESS, userName: USERNAME});
Addtional documentation is available on the Angulartics site.
npm run build