<commit_before>## angulartics-localytics

[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-downloads-url] [![Bower version][bower-image]][bower-url] [![Dependencies status][dep-status-image]][dep-status-url] [![MIT license][license-image]][license-url] [![Join the Slack chat][slack-image]][slack-url]

Localytics plugin for [Angulartics](http://github.com/luisfarzati/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](https://github.com/angulartics/angulartics-localytics/issues/new?title=I+want+to+join+as+maintainer).

## Install

First make sure you've read installation and setup instructions for [Angulartics](https://github.com/luisfarzati/angulartics#install).

Then you can install this package either with `npm` or with `bower`.

### npm

```shell
npm install angulartics-localytics
```

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

```javascript
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](http://github.com/angulartics).

### bower

```shell
bower install gemr/angulartics-localytics
```

Add this `<script>` to your `index.html`:

```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:

```javascript
angular.module('myApp', [
  'angulartics',
  'angulartics.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. 

```javascript
$analytics.setUsername(userId)
$analytics.setUserProperties({ email: EMAILADDRESS, username: USERNAME});
```

Addtional documentation is available on the [Angulartics site](http://luisfarzati.github.io/angulartics).

## Development

```shell
npm run build
```

## License

[MIT](LICENSE)

[npm-image]: https://img.shields.io/npm/v/angulartics-localytics.svg
[npm-url]: https://npmjs.org/package/angulartics-localytics
[npm-downloads-image]: https://img.shields.io/npm/dm/angulartics-localytics.svg
[npm-downloads-url]: https://npmjs.org/package/angulartics-localytics<commit_msg>doco - spelling<commit_after>## angulartics-localytics

[![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-downloads-url] [![Bower version][bower-image]][bower-url] [![Dependencies status][dep-status-image]][dep-status-url] [![MIT license][license-image]][license-url] [![Join the Slack chat][slack-image]][slack-url]

Localytics plugin for [Angulartics](http://github.com/luisfarzati/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](https://github.com/angulartics/angulartics-localytics/issues/new?title=I+want+to+join+as+maintainer).

## Install

First make sure you've read installation and setup instructions for [Angulartics](https://github.com/luisfarzati/angulartics#install).

Then you can install this package either with `npm` or with `bower`.

### npm

```shell
npm install angulartics-localytics
```

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

```javascript
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](http://github.com/angulartics).

### bower

```shell
bower install gemr/angulartics-localytics
```

Add this `<script>` to your `index.html`:

```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:

```javascript
angular.module('myApp', [
  'angulartics',
  'angulartics.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. 

```javascript
$analytics.setUsername(userId)
$analytics.setUserProperties({ email: EMAILADDRESS, userName: USERNAME});
```

Addtional documentation is available on the [Angulartics site](http://luisfarzati.github.io/angulartics).

## Development

```shell
npm run build
```

## License

[MIT](LICENSE)

[npm-image]: https://img.shields.io/npm/v/angulartics-localytics.svg
[npm-url]: https://npmjs.org/package/angulartics-localytics
[npm-downloads-image]: https://img.shields.io/npm/dm/angulartics-localytics.svg
[npm-downloads-url]: https://npmjs.org/package/angulartics-localytics
{'fraction_non_alphanumeric': 0.158716540837337, 'fraction_numerical': 0.0006863417982155113, 'mean_word_length': 4.911764705882353, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '694035', 'n_tokens_mistral': 2016, 'n_tokens_neox': 1932, 'n_words': 456}