blink-labrador
A package that uses blink for analytics on Labrador pages
Installation
npm install @aller/blink-labrador
Usage
import BlinkLabrador from './blink-labrador';
function initTracking() {
const tracker = new BlinkLabrador();
tracker.trackPageload();
tracker.trackAdInscreen0('.adunit');
tracker.trackAdInscreen('.adunit');
tracker.trackActiveTime();
tracker.trackLinkClicks();
tracker.trackArticleImpressions('article.preview,.article-list>li');
tracker.trackAdDFP();
window.trackAdLoad = tracker.trackAdLoad;
window.trackVideo = tracker.trackVideo;
window.trackCustom = tracker.trackCustom;
}
initTracking();
Releasing
-
Make sure that the latest changes is merged into master via a pull request
-
If it is a bugfix run npm version patch
, if it is a new feature run npm version minor
, and if where is a breaking change run npm version major
. We use semantic versionion, and 1.0.0 is no holy grail for "finished" software, and we should not be afraid of releasing major versions.
-
Publish it by running npm publish
. This will transpile all files and publish them to npm.
-
Push the release to GitHub by running git push
and git push --tags
from master.
-
It is greatly appreciated if you write a summary of the release on GitHub releases. You do that by opening the releases overview page on GitHub, clicking your newly pushed release, and then clicking the "Edit tag" button.