Intercom plugin for Angulartics.
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-intercom
Then add angulartics.intercom
as a dependency for your app:
require('angulartics')
angular.module('myApp', [
'angulartics',
require('angulartics-intercom')
]);
Please note that core Angulartics doesn't export the name yet, but it will once we move it into the new organization.
bower install angulartics-intercom
Add the <script>
to your index.html
:
<script src="/bower_components/angulartics-intercom/dist/angulartics-intercom.min.js"></script>
Then add angulartics.intercom
as a dependency for your app:
angular.module('myApp', [
'angulartics',
'angulartics.intercom'
]);
Documentation is available on the Angulartics site.
You can set an option to only send to Intercom if an attribute is present on the element. This is required because of the event throttling (500 - 1000/minute).
angular
.module('myApp', [])
.config(function ($analyticsProvider) {
$analyticsProvider.settings.intercomRequiresAttribute = true;
});
When this is set an event will only be sent if an analytics-intercom
attribute is on the element reporting the event. E.g.:
<button ng-click="doTheThing()" analytics-on analytics-category="Thing" analytics-event="Was Done" analytics-intercom>DO THE THING</button>
npm run build