@aller/blink-labrador
v8.30.0
Published
Library for using blink on Labrador
Downloads
2,518
Readme
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, // Aller Media consent
consentedToAll: false,
applies: false,
});
// Expose blink functions to other modules
window.trackAdLoad = tracker.trackAdLoad;
window.trackCustom = tracker.trackCustom;
window.trackConsent = tracker.trackConsent;
}
initTracking();