I’m developing an app which can help my users to installsome js Code into thier store. in my theme app extension i have blocks/app-embed-block.liquid which contains the js code i want to insert to the head of store:
{% if settings.enable_tracking %}
{% endif %}
{% schema %}
{
“name”: “Matomo Embed Block”,
“target”:“head”,
“settings”: [
{
“type”: “checkbox”,
“id”: “enable_tracking”,
“label”: “Enable Tracking”,
“default”: true
}
]
}
{% endschema %}
I did “shopify app deploy” and then installed the app on my test store and activated the app embed. All seemed fine.But the expected js code didnt appear in my test store’s head.
So how to insert code to a store? Is app embed the right way? I know Scripttags can do it but will be deprecated soon.