This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7673a58
commit 98187f7
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
export const pageLoad = (window) => { | ||
/* eslint-disable no-undef */ | ||
export const pageLoad = () => { | ||
const dataLayer = window.dataLayerNativeX; | ||
if (dataLayer) dataLayer.push({ event: 'page_load' }); | ||
}; | ||
|
||
export const outboundLink = (window, url) => { | ||
export const outboundLink = (url) => { | ||
const dataLayer = window.dataLayerNativeX; | ||
if (dataLayer) dataLayer.push({ event: 'outbound_click', outbound_url: url, eventTimeout: 3000 }); | ||
}; | ||
|
||
export const share = (window, provider) => { | ||
export const share = (provider) => { | ||
const dataLayer = window.dataLayerNativeX; | ||
if (dataLayer) dataLayer.push({ event: 'share', social_provider: provider }); | ||
}; | ||
|
||
export const endOfContent = (window) => { | ||
export const endOfContent = () => { | ||
const dataLayer = window.dataLayerNativeX; | ||
if (dataLayer) dataLayer.push({ event: 'scroll_to_bottom' }); | ||
}; |