lstellway / snippets

4 stars 2 forks source link

Small error: wrong mapping of add_to_cart event parameters in JSON import file #2

Open somejuandk opened 5 months ago

somejuandk commented 5 months ago

Thanks for the awesome work!

Just a small heads up: add to cart event parameters are mapped as user parameters in the .JSON import - should be mapped as event parameters.

I've added some console logs inside the shopify-js code to reassure that the event has fired even prior to console logging the dataLayer.

Also small improvement could be adding user_data parameter into the template.

octipus commented 1 month ago

Thanks for the awesome work!

Just a small heads up: add to cart event parameters are mapped as user parameters in the .JSON import - should be mapped as event parameters.

I've added some console logs inside the shopify-js code to reassure that the event has fired even prior to console logging the dataLayer.

Also small improvement could be adding user_data parameter into the template.

thanks for the headsup about the add_to_cart event

lstellway commented 2 weeks ago

Thanks for the heads up! Feel free to create a PR if you have any time - otherwise I'll try to address it if/when another project comes around (though, I don't know when that will be, as I currently do not have any Shopify work on my radar).

I'd like to revisit the implementation a bit as a whole, as I've learned a bit more about both platforms.