angulartics/angulartics-localytics

Name: angulartics-localytics

Owner: angulartics

Description: Localytics plugin for Angulartics

Created: 2015-07-24 01:00:14.0

Updated: 2016-09-08 14:14:27.0

Pushed: 2016-01-26 20:04:34.0

Homepage: null

Size: 14

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

angulartics-localytics

NPM version NPM downloads Bower version Dependencies status MIT license Join the Slack chat

Localytics plugin for Angulartics.

Important Note

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.

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
install angulartics-localytics

Then add angulartics.localytics as a dependency for your app:

ire('angulartics')

lar.module('myApp', [
ngulartics',
quire('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
r install gemr/angulartics-localytics

Add this <script> to your index.html:

ipt>
+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');
ript>

Then add angulartics.localytics as a dependency for your app:

lar.module('myApp', [
ngulartics',
ngulartics.localytics'

Documentation
User tracking

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.

lytics.setUsername(userId)
lytics.setUserProperties({ email: EMAILADDRESS, userName: USERNAME});

Addtional documentation is available on the Angulartics site.

Development
run build
License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.