Inject tag script in liquid

Aya-Ibrahim
Shopify Partner
5 0 0

Hello, 
I'm trying to add a custom <script> tag to the shop immediately when my app is installed, but I'm having a hard time figuring out how. This simple task has proven quite difficult for me

My goals are:
1. Add a custom script to the shop immediately when the app is installed with/ post-script-tags
2. Use REST Admin APIs mutations post-script-tags and delete-script-tags w/ Shopify's Polaris's <SettingToggle> component
if SettingToggle enabled = post-script-tags
if SettingToggle disabled = delete-script-tags

Can anyone point me in the right direction? Could you send me some example code of what others have done? As each time we inject the script into the liquid, the script does not run.
This is an application that needs to be installed seamlessly by clients, so I can't manually alter their template files.

Thanks in advance.

Reply 1 (1)

Aya-Ibrahim
Shopify Partner
5 0 0

I need your urgent help.