The Engagement JS Client
The Engagement JS Client sends engagement metrics (e.g. time on page, scroll position, etc. ) to an Engagement Server at regular intevals. Please see README.md for more details
- An API Key generated from the engagement settings section
- A page with content identifiable by either class or ID
engageConfig = {
element: '.text_content',
api_key: 'YOUR_API_KEY',
dimensions: { // optional
tags: ['sports', 'commentary', 'statistics'],
author: 'john doe',
},
};
(function() {
var e = document.createElement('script');
e.src = 'https://cdn.rawgit.com/nicksoto/engagement/3e3a6705/dist/engage.min.js';
e.type = 'text/javascript';
e.async = 'true';
e.onload = e.onreadystatechange = function() {
var rs = this.readyState;
if (rs && rs != 'complete' && rs != 'loaded') return;
try { engage.run(engageConfig) } catch (e) {}
};
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(e, s);
})();
Please read CONTRIBUTING.md for details on contributing as well as information on system setup
Copyright (c) Nick Soto