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.trackPerformance();
tracker.trackChromeWebVitals();
tracker.trackAdInscreen0('.adunit');
tracker.trackAdInscreen('.adunit');
tracker.trackActiveTime();
tracker.trackLinkClicks();
tracker.trackArticleImpressions('article.preview,.article-list>li');
tracker.trackAdDFP();
tracker.trackVideos();
tracker.trackConsent({
uuid: '4f842ac4-50a1-40c7-bc8f-23a4373122f3_25',
tcfV2:
'CP00b0AP00b0AAGABBENAYEgAAAAAEPAACgAAAANXgLgAIAAqAB4AEAAMgAaABzAD8AM0AfoBEQCLAEiAJSAXUA6QB5gD7QJkAmUBSYC8wGCANXADCgAQA5jwAQAcwDzFQAQAcwEygAA.YAAAAAAAAAAA',
kind: 'gdpr',
consentGranted: true,
consentedToAll: false,
applies: false,
});
window.trackAdLoad = tracker.trackAdLoad;
window.trackCustom = tracker.trackCustom;
window.trackConsent = tracker.trackConsent;
}
initTracking();