@aller/blink-labrador
Advanced tools
Comparing version 8.15.9 to 8.16.0-alpha.0
@@ -30,3 +30,3 @@ import { Blink, AdLoadInput, CustomInput } from '@aller/blink'; | ||
_trackVideoEvent(ev: JWEvent): void; | ||
trackVideos: (withLinkPulse?: boolean) => void; | ||
trackVideos: () => void; | ||
trackLoadedPlayer(): void; | ||
@@ -38,5 +38,5 @@ trackCustom: (input: CustomInput) => void; | ||
trackSingleArticleImpression: (title: string, url: string, domElement?: HTMLElement | undefined) => void; | ||
trackVideoSPA: (selector: string, withLinkPulse?: boolean) => void; | ||
_trackVideoSpaPage(trackClose?: boolean, withLinkPulse?: boolean): void; | ||
trackVideoSPA: (selector: string) => void; | ||
_trackVideoSpaPage(trackClose?: boolean): void; | ||
trackBoxes(selector: string): void; | ||
} |
@@ -36,3 +36,2 @@ "use strict"; | ||
var kk_jw_subscriber_1 = require("./utils/kk-jw-subscriber"); | ||
var lp_jw_subscriber_1 = require("./utils/lp-jw-subscriber"); | ||
/** | ||
@@ -62,17 +61,11 @@ * Docs: https://www.iab.com/guidelines/state-of-viewability-transaction-2015/ | ||
}; | ||
this.trackVideos = function (withLinkPulse) { | ||
if (withLinkPulse === void 0) { withLinkPulse = false; } | ||
this.trackVideos = function () { | ||
var videoNodes = document.querySelectorAll('[data-videoid]'); | ||
if (!((videoNodes === null || videoNodes === void 0 ? void 0 : videoNodes.length) > 0 && _this_1.maxRetriesVideoNode < 10)) { | ||
_this_1.maxRetriesVideoNode++; | ||
setTimeout(function () { return _this_1.trackVideos(withLinkPulse); }, _this_1.maxRetriesVideoNode * 200); | ||
setTimeout(function () { return _this_1.trackVideos(); }, _this_1.maxRetriesVideoNode * 200); | ||
} | ||
for (var i = 0; i < videoNodes.length; i++) { | ||
var currentNode = videoNodes[i]; | ||
if (withLinkPulse) { | ||
setupSveltePlayerTracking(currentNode, i, _this_1); | ||
} | ||
else { | ||
setupPlayerTracking(currentNode, _this_1); | ||
} | ||
setupSveltePlayerTracking(currentNode, i, _this_1); | ||
// Listen for events coming in from iframes | ||
@@ -109,8 +102,7 @@ window.addEventListener('message', function (event) { | ||
}; | ||
this.trackVideoSPA = function (selector, withLinkPulse) { | ||
if (withLinkPulse === void 0) { withLinkPulse = false; } | ||
this.trackVideoSPA = function (selector) { | ||
var spaLinks = document.querySelectorAll(selector); | ||
spaLinks.forEach(function (element) { | ||
element.addEventListener('click', function () { | ||
_this_1._trackVideoSpaPage(false, withLinkPulse); | ||
_this_1._trackVideoSpaPage(false); | ||
}); | ||
@@ -126,3 +118,3 @@ }); | ||
if (!isVideoSpaEvent) { | ||
_this._trackVideoSpaPage(true, withLinkPulse); | ||
_this._trackVideoSpaPage(true); | ||
} | ||
@@ -344,4 +336,2 @@ }); | ||
kk_jw_subscriber_1.KilkayaJWSubscriber(player); | ||
// TODO: Remove LinkPulse stuff when Kilkaya tracks data correctly | ||
lp_jw_subscriber_1.LinkPulseJWSubscriber(player); | ||
}, false); | ||
@@ -398,9 +388,8 @@ }; | ||
}; | ||
LabradorTracker.prototype._trackVideoSpaPage = function (trackClose, withLinkPulse) { | ||
LabradorTracker.prototype._trackVideoSpaPage = function (trackClose) { | ||
if (trackClose === void 0) { trackClose = false; } | ||
if (withLinkPulse === void 0) { withLinkPulse = false; } | ||
this.pageInit(); | ||
this.trackPageload(); | ||
if (!trackClose) { | ||
this.trackVideos(withLinkPulse); | ||
this.trackVideos(); | ||
} | ||
@@ -460,4 +449,2 @@ this.trackAdInscreen('.adunit'); | ||
kk_jw_subscriber_1.KilkayaJWSubscriber(player); | ||
// TODO: Remove LinkPulse stuff when Kilkaya tracks data correctly | ||
lp_jw_subscriber_1.LinkPulseJWSubscriber(player); | ||
return; | ||
@@ -475,4 +462,2 @@ } | ||
kk_jw_subscriber_1.KilkayaJWSubscriber(player); | ||
// TODO: Remove LinkPulse stuff when Kilkaya tracks data correctly | ||
lp_jw_subscriber_1.LinkPulseJWSubscriber(player); | ||
}); | ||
@@ -479,0 +464,0 @@ } |
import { JWPlayer } from './subscribe-to-jw'; | ||
export declare function shouldTrackVideoChannelEvent(player: JWPlayer, tracker: 'linkpulse' | 'kilkaya' | 'blink' | 'ga', event: 'videoLoad' | 'videoPlay' | 'videoStop', playlistItem?: { | ||
export declare function shouldTrackVideoChannelEvent(player: JWPlayer, tracker: 'kilkaya' | 'blink' | 'ga', event: 'videoLoad' | 'videoPlay' | 'videoStop', playlistItem?: { | ||
mediaid: string; | ||
channelId?: string | undefined; | ||
}): boolean; |
@@ -6,3 +6,2 @@ "use strict"; | ||
var trackers = {}; | ||
// TODO: Remove 'linkpulse' as tracker when Kilkaya tracks data correctly | ||
function shouldTrackVideoChannelEvent(player, tracker, event, playlistItem) { | ||
@@ -9,0 +8,0 @@ if (playlistItem === void 0) { playlistItem = player.getPlaylistItem(); } |
@@ -13,4 +13,4 @@ export declare enum JWEvents { | ||
} | ||
export declare type Tracker = 'linkpulse' | 'kilkaya' | 'blink' | 'ga'; | ||
export declare type Tracker = 'kilkaya' | 'blink' | 'ga'; | ||
export declare function shouldTrackVideoEvent(tracker: Tracker, position: number): boolean; | ||
export declare function updateTrackEvent(tracker: Tracker, event: JWEvents, position?: number): void; |
{ | ||
"name": "@aller/blink-labrador", | ||
"version": "8.15.9", | ||
"version": "8.16.0-alpha.0", | ||
"description": "Library for using blink on Labrador", | ||
@@ -75,3 +75,3 @@ "main": "lib/main.js", | ||
"dependencies": { | ||
"@aller/blink": "8.15.9", | ||
"@aller/blink": "8.16.0-alpha.0", | ||
"@soldotno/aller-in-view": "^3.0.2", | ||
@@ -91,3 +91,3 @@ "react": "^16.11.0" | ||
}, | ||
"gitHead": "fa3b304558a47b314486489f62c1caec3d99b668" | ||
"gitHead": "0ecb1d25735e933fb17a3f6a6ea17245e676c0dd" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
448666
221
6067
2
+ Added@aller/blink@8.16.0-alpha.0(transitive)
- Removed@aller/blink@8.15.9(transitive)
Updated@aller/blink@8.16.0-alpha.0