Skip to content

Commit 338442f

Browse files
author
Nicole Emer
committed
addded page number to catch direct
1 parent bc2c523 commit 338442f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

extensions/doPlugins/doPlugins_global.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,9 @@ s._articleViewTypeObj = {
317317
isDirect: function (referrer) {
318318
const noReferrer = this.isWithoutReferrer(referrer);
319319
const sessionStart = s._utils.isSessionStart();
320+
const pageOneInSession = s._utils.isPageOneInSession();
320321

321-
return (noReferrer && sessionStart);
322+
return (noReferrer && (sessionStart || pageOneInSession));
322323

323324
},
324325

@@ -415,13 +416,16 @@ s._articleViewTypeObj = {
415416
mkt_channel_detail = referringDomain;
416417
} else if (this.isFromPremiumService(referrer)||this.isFromPaypal(referrer)) {
417418
pageViewEvent = 'event23,event201'; // Login via secure.mypass during session
418-
} else if (this.isWithoutReferrer() && this.isNavigated() && isArticle && isSessionStart) {
419+
} else if (this.isDirect() && this.isNavigated() && isArticle) {
419420
pageViewEvent = 'event26,event202'; // Dark Social
420421
channel = 'Dark Social';
421-
} else if (this.isWithoutReferrer() && this.isNavigated() && isArticle) {
422+
} else if (this.isDirect() && this.isNavigated()) {
423+
pageViewEvent = 'event207'; // Direct
424+
channel = 'Direct';
425+
}else if (this.isWithoutReferrer() && this.isNavigated() && isArticle) {
422426
pageViewEvent = 'event26,event202'; // Dark Social Marketing Channel only with session start
423427
}else if (this.isDirect(referrer)) {
424-
pageViewEvent = 'event207'; // no Referrer at Session Start
428+
pageViewEvent = 'event207'; // Fallback
425429
channel = 'Direct';
426430
} else {
427431
pageViewEvent = 'event27,event203'; // Other External (Referrer)

0 commit comments

Comments
 (0)