Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Recommended way to replace ScriptTag functionality in a 3rd party app?

Solved

Recommended way to replace ScriptTag functionality in a 3rd party app?

dougbright
Shopify Partner
8 0 2

Hi everyone - we maintain a 7 year old app installed by about 800 shops that does affiliate tracking. Currently, upon install, the app installs a ScriptTag which calls JS that reads the URL and stores any "clickId" parameter it finds in a cookie that we read later upon purchase. Now that ScriptTags are going away, what is the official supported method to perform this function?

 

I had hoped that we might be able to use "landing_site" property in the API order record to get this info but, after some study, only a small fraction of our affiliate conversions have this field populated with the clickId we need.

 

I imagine we can't be the only folks running into this problem so I'm hoping there's some extension based solution or other method that has been tested and blessed already.

Accepted Solution (1)

PaulNewton
Shopify Partner
7450 655 1558

This is an accepted solution.

App blocks can bring in javascript.

https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#app-blocks-for-... 

 

ScriptTags are not going away they are merely recommended to be used to support vintage themes for NEW apps.

You don't need to update apps that are using ScriptTag and are already published on the Shopify App ...


 

It's checkout-scripts that are being depreciated.

https://community.shopify.com/c/hydrogen-headless-and-storefront/shopify-scripttag-deprecation/m-p/2... 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


View solution in original post

Replies 3 (3)

PaulNewton
Shopify Partner
7450 655 1558

This is an accepted solution.

App blocks can bring in javascript.

https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#app-blocks-for-... 

 

ScriptTags are not going away they are merely recommended to be used to support vintage themes for NEW apps.

You don't need to update apps that are using ScriptTag and are already published on the Shopify App ...


 

It's checkout-scripts that are being depreciated.

https://community.shopify.com/c/hydrogen-headless-and-storefront/shopify-scripttag-deprecation/m-p/2... 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


dougbright
Shopify Partner
8 0 2

Hi Paul - thank you for the quick and thorough response. This is indeed good news as we were originally contacted by Shopify saying that ScriptTags would definitely be replaced on the Order Status/Thank You page. We inferred that they would be replaced everywhere.

 

Just so I'm totally clear, has Shopify walked back the deprecation of ScriptTags on the Order Status/Thank You page as well? This is where our ScriptTag reads the data back in from the cookie and contacts our servers to complete the conversion.

RAd_Tag_Team
Shopify Partner
12 0 3

Hi @dougbright,

 

You are right, ScriptTags will be deprecated and will not work once a merchant has upgraded the order status and thank you pages to checkout extensibility. We have seen this with a few Shopify Plus merchants which performed the upgrade and where the tracking broke afterwards as the script was no longer injected.

 

They can still revert those pages back for now.

 

For apps the long-term solution will be to look at Shopify's web or server pixels.

https://shopify.dev/docs/apps/marketing/pixels

 


ScriptTags and Additional scripts on the Order Status Page (OSP) and Thank You page (TYP) will be completely deprecated Aug 12, 2025.