Checkout page additional scripts and checkout.liquid

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 :waving_hand:
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.

1 Like

The best place these days for most tracking is to use Shopify’s new Customer Events (or Custom Pixels): https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels

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.

1 Like