Last active
November 11, 2020 19:11
-
-
Save Mosquid/5f6b95f90264f71f9f6bd9d75afc16eb to your computer and use it in GitHub Desktop.
isProductPage gearbest
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
{ | |
isProductPage: () => { | |
try { | |
const [pageData] = window.dataLayer | |
return pageData.PAGE === "goods" ? true : false | |
} catch (err) { | |
console.error(err) | |
return false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment