Provide common analytic tracking for your ember projects
Features:
- track page views on route transitions
- Ember.js v2.18 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
ember install ember-cli-google-analytics
Supply your google analytics id in config/environment.js
You can separate testing and production analytics by specifying the id's like so:
if (environment === 'development') {
ENV.googleAnalyticsId = '<your-development-tracking-id>';
}
if (environment === 'production') {
ENV.googleAnalyticsId = '<your-production-tracking-id>';
}
While you are developing and testing, you can run npm link from the root of your addon project. This will make your addon locally available by name.
Then run npm link in any hosting application project root to make a link to your addon in your node_modules directory, and add the addon to the package.json. Any change in your addon will now directly take effect in any project that links to it this way.
While testing an addon using npm link, you need an entry in package.json with your addon name, with any valid npm version: "<addon-name>":"version"
. You need to put "ember-cli-google-analytics": "*"
.
See https://ember-cli.com/extending/#link-to-addon-while-developing
See the Contributing guide for details.
This project is licensed under the MIT License.