Add script to shopware shop from a shopware app

Hi,

I’m a developer of a shopware app, i want to add a script tag to my app clients’ shop, so that they dont need to do it manually.

More specifically, how can i add script like this:


to a shopware shop from a shopware app?

I found this Add Custom Javascript | Shopware Documentation, but it’s for plugins, can it also apply for apps?

Or should i use the script endpoint of admin api: Create a new Script resources. | Admin API?

I hope i described my situation clearly and look forward to your reply.

Best wishes

Deng