Last active
December 22, 2017 22:08
-
-
Save ovlb/790059a73c5cf9f21e2370ad8cad8c85 to your computer and use it in GitHub Desktop.
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
$testButton.addEventListener('click', (e) => { | |
e.preventDefault() | |
// In a real app there will probably be more logic to an input then just | |
// emitting an event. Therefore we check if fbq is defined | |
// to avoid exceptions after deactivating tracking | |
if (window.hasOwnProperty('fbq')) { | |
window.fbq('trackCustom', 'PixelOptOutTest') | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment