Hi folks, my name is Edward. I’m Shopify’s Developer Advocate – the link between 3rd party developers and Shopify. I’d like to introduce you to a hot new feature in the Shopify API called ScriptTags.
This post is targeted at Shopify developers, so for the technically curious out there, join us! If you want to know how this makes your life better as a shop owner, just know that Shopify Apps will now be faster, easier to install and uninstall and won’t have compatibility issues with themes.
We’ve heard from developers about how it’s a pain to ask shop owners to cut & paste code into their themes during installation. It’s error-prone and it’s one more thing to do. Let’s fix that.
Introducing the ScriptTags API
Here’s how to use it:
2) Authenticate with the shop, then make this call:
HTTP POST http://their-shop.myshopify.com/admin/scripttags <?xml version="1.0" encoding="UTF-8"?> <script-tag> <src>http://example.com/your-awesome-script.js</src> <event>onload</event> </script-tag>
3) There is no step 3. All requests for the shop will now include
Particularly awesome things about this:
Want more? The official docs are up here: http://api.shopify.com/scripttag.html
Jump into the Shopify Apps forum if you’ve got any questions or comments.