Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/auth0/auth0-analytics.js

Auth0 Analytics (Web)
https://github.com/auth0/auth0-analytics.js

analytics auth0 auth0-lock facebook-analytics

Last synced: 3 days ago
JSON representation

Auth0 Analytics (Web)

Awesome Lists containing this project

README

        

[![Build status][circleci-image]][circleci-url]
[![License][license-image]][license-url]

# Auth0 Analytics (Web)

This library adds Facebook and Google analytics integrations to Lock.

## Usage

```html

```

> Notice: The script version above uses a placeholder version `X.Y.Z`. In order to determine the latest release view the [releases](https://github.com/auth0/auth0-analytics.js/releases/). For example, to reference release `1.2.0` use `https://cdn.auth0.com/js/analytics/1.2.0/analytics.min.js`

### Optional Configuration

If you want to enable either the Facebook or Google Analytics integrations you can do so with the optional configuration.

> Note: This must be placed on the page before the analytics script is loaded.

```html

window.auth0AnalyticsOptions = {
'facebook-analytics': {
id: 'YOUR_FACEBOOK_APP_ID'
}
}

```

If you already have the Facebook JS SDK on your page you can set the script to use that.

```html

window.auth0AnalyticsOptions = {
'facebook-analytics': {
preloaded: true
}
}

```

[circleci-image]: https://img.shields.io/circleci/project/github/auth0/auth0-analytics.js.svg?style=flat-square
[circleci-url]: https://circleci.com/gh/auth0/auth0-analytics.js/tree/master
[license-image]: http://img.shields.io/npm/l/auth0-lock.svg?style=flat-square
[license-url]: #license