Data Listener Script to be Removed from Checkout Settings
When upgrading to the new Shopify Source reference this for an example of the data listener script you may need to remove
The script on your checkout settings may vary slightly depending on the last version you've installed, but overall should be similar with the opening script tag with the ID of elevar-dl-listener-config and closing with a closing script tag.
<script id="elevar-dl-listener-config" type="application/json">{"ss_url": null, "signing_key": null, "myshopify_domain": null, "data_layer_listener_script": "https://shopify-gtm-suite.getelevar.com/shops/7ddbe4b9dd7d0bc7a28f4a47c8ea7c0dced00000/3.8.3/events.js"}</script><script>
(() => {
if (!window.__ElevarIsGtmSuiteListenerCalled) {
window.__ElevarIsGtmSuiteListenerCalled = true;
const configElement = document.getElementById(
"elevar-dl-listener-config"
);
if (!configElement) {
console.error("Elevar: DLL Config element not found");
return;
}
const config = JSON.parse(configElement.textContent);
const script = document.createElement("script");
script.type = "text/javascript";
script.src = config.data_layer_listener_script;
script.async = false;
script.defer = true;
script.onerror = function () {
console.error("Elevar: DLL JS script failed to load");
};
script.onload = function () {
if (!window.ElevarGtmSuiteListener) {
console.error("Elevar: `ElevarGtmSuiteListener` is not defined");
return;
}
window.ElevarGtmSuiteListener.handlers.listen({
ssUrl: config.ss_url,
signingKey: config.signing_key,
myshopifyDomain: config.myshopify_domain
});
};
document.head.appendChild(script);
}
})();
</script>
Updated over 1 year ago