Hi there!
I’m trying to get the value of a checkout object property to get pushed to the dataLayer on the Order Status page after a purchase. But for some reason I can’t seem to access it.
The image attached shows that the ‘selling_plan_name’ property exists in checkout.line_items[0].selling_plan_name.
But when calling that directly in Order Status Page>Additional scripts I can’t get it to show in the dataLayer.
Ideally, I’ll be able to iterate through the purchased items and push to the DL in an array, but first just trying to figure out why this can’t be picked up.
Also, here’s the dataLayer script I’m using.
subscriptionStatus is this new property I’m trying to call by following the same format as the others in the line_items loop:
{% comment %} Purchase data layer v2.1 - part of "Shopify GA4 Kit" by Analyzify
Visit https://analyzify.app/shopify-google-analytics/ga4 for complete tutorial
{% endcomment %}
{% assign template_name = template.name %}
No matter what I try the array comes back blank in the dataLayer.
If it’s available via the console, what’s stopping me from being able to pull that value?
Any help would be much appreciated!
