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
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024