Personalized checkout and custom promotions with Shopify Scripts
Hello,
I'm trying to add this script to a blog post so that when a user lands on this page, these event values are pushed to the dataLayer.
Here is the script :
{% if page.url == "/blogs/news/login-page" %}
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'login',
'customerType': 'regular',
'registrationCountry': 'France'
});
</script>
{% endif %}
However, nothing is apparent in the dataLayer. I put this script in theme.liquid.
Could you help me please?
Thanks
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024