Is adding code in checkout.liquid layout the same as adding it in the additional scripts section in settings → checkout and accounts? We have shopify plus so we have access to both locations.
I need to add some conversion tracking code and wondering where is the best place to put it.
Hi @Riki1
For conversion tracking code just drop it in the additional scripts section as that is what it is intended for. Checkout.liquid could also handle tracking but its main purpose is for checkout customization.
The primary benefit being is it’s in a sandbox so it’s secure and there’s no conflict with other scripts. I’ve seen so many tracking issues over the years due to JavaScript errors or conflicting functions in other places that break tracking.