Other integration methods

If you're creating a new app that integrates with a theme, and you're submitting the app to the Shopify App Store, then you need to use theme app extensions. However, if you offer your app functionality as an app block, which isn't compatible with vintage themes, then you still might need to use the Asset or ScriptTag resource in addition to theme app extensions.

Apps that are already published on the Shopify App Store are exempt from this requirement.

The Asset resource

If your app must modify the code of vintage themes, then you should use the Asset REST Admin API resource to inject the app snippets into the theme's Liquid files. You should also include detailed instructions for the merchant on how to add and remove the code.

Assets are the individual files that make up an online store's theme. You can use the Asset REST Admin API resource to add, change, or remove asset files from a shop's theme. You will need to provide merchants who use the app with detailed instructions on how to add and remove any code your app injects into the theme with the Asset resource.

You can do the following with the Asset resource:

  • Retrieve an asset or a list of assets for a theme
  • Create or update an asset for a theme
  • Delete an asset from a theme

To get started, take a look at the Asset resource.

The ScriptTag resource

If your app adds app blocks, which aren't compatible with vintage themes, then you can use the ScriptTag REST Admin API or GraphQL Admin API resource as an alternate installation path for the functionality introduced by the app block. If you're submitting a new app to the Shopify App Store, then you still need to provide app blocks for Online Store 2.0 themes. Learn how to verify support for app blocks.

A script tag represents some JavaScript code running on a remote server. You can use the ScriptTag resource to load the JavaScript from a remote server into a theme section at the time the section's page is viewed. Script tags are scoped to the app that created them. When an app is uninstalled from a shop, all of the script tags that it created are also removed.

You can do the following with the ScriptTag resource:

  • Add functionality to a shop's page without having to manually edit a theme's template.
  • Let merchants uninstall your app without needing to edit a theme's template to revert any changes the app made.

To get started, take a look at the ScriptTag REST Admin API or GraphQL Admin API resource.