Last active
June 15, 2019 09:46
-
-
Save tiagogm/00c66132427c9e5b935dec73c898abbf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const pushEvent = (event: IEvent) = { | |
if (typeof window === 'undefined' || !window.dataLayer) { | |
return; | |
} | |
window.dataLayer.push( event: event.name, ...event.properties }); | |
} | |
export const GTM = { | |
pushEvent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment