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
// Parse the 'key' parameter along with existing parameters | |
const getQueryParam = (param) => { | |
const scripts = document.getElementsByTagName("script"); | |
const src = scripts[scripts.length - 1].src; | |
return new URLSearchParams(src.split("?")[1]).get(param); | |
}; | |
const hubspot_portalId = getQueryParam("hubspot_portalId"); | |
const hubspot_region = getQueryParam("hubspot_region") || "eu1"; |
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
This is a sample gist created via browser automation. |