Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello guys,
We have a script that we've been working on that works perfectly on a regular html-file when testing in localhost.
But when trying to publish the code to Shopify everything is blanked and nothing shows up.
What could be the issue? I've been scracthing my head now for hours trying to solve this.
<script src="https://cdn.ingrid.com/delivery-tracking/bootstrap.js"></script>
<div id="tracking"></div>
<script>
const containerId = "tracking";
function setupWidget(){
const params = new URLSearchParams(window.location.search);
const identifier = params.get("identifier");
const contact = params.get("contact");
if (identifier && contact){
window.IngridDeliveryTrackingWidgetApi.renderPrivateMode({
containerId,
siteId:"7f927e54-7d90-4654-9e7a-4f8264ecd438",
locale: "sv-SE",
identifier: identifier,
contact: contact,
});
return;
}
window.IngridDeliveryTrackingWidgetApi.renderSearchMode({
containerId,
siteId: "7f927e54-7d90-4654-9e7a-4f8264ecd438",
locale: "sv-SE",
prefillContact: contact,
prefillIdentifier: identifier
});
return
}
window.addEventListener("load", () => {
setupWidget();
});
</script>
In Canada, payment processors, like those that provide payment processing services t...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025