make .js file only work with app

Solved
Highlighted
Excursionist
58 2 1

I am new to Shopify app development so if anyone here can create apps please reply with your website etc... anyway if I create an app is it possible for a .js file to only work if the app is installed? I want to inject a .js file into a users theme and if they no longer have the app installed the file doesn't work.

0 Likes
Highlighted
Shopify Partner
70 7 24

This is an accepted solution.

Hi benjk,

 

Take a look at the ScriptTag API:

 

https://shopify.dev/docs/admin-api/rest/reference/online-store/scripttag?api[version]=2020-04

 

GMKnight.

Store owner and app developer. Canada.
1 Like
Highlighted
Excursionist
58 2 1

Thanks

0 Likes