Automate adding Additional Scripts to checkout

Hi all,

I’m building an affiliate tracking app and I was wondering if there’s anyway through the API to automate adding a script to the additional scripts section in the checkout settings? I’m just playing around at the moment and maybe I’ve got the wrong end of the stick but I’m hoping that when a merchant installs my app, I don’t need for them to manually have to go and add scripts - any advice would be really welcomed.

Thanks in advance,

Chris

Order status JavaScript asset

This JavaScript asset can also be accessed through ScriptTag.> > https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status/order-status-javascript-asset

Is there a way to do this using theme app extension rather than script tag? (since it says app won’t pass app review if we use script tags now)