Skip to main content

Linking

info

Linking is only available to early access partners. Apply here to join the early access program.

The Shop app has built-in support for deep links, universal links (iOS) and app links (Android). Using this feature, you can create links that send users directly into your Shop Mini to drive increased adoption and growth.

https://shop.app/mini/<mini_handle>?shop_id=<shop_id>&product_id=<product_id>&product_variant_id=<product_variant_id>&order_id=<order_id>

Example: https://shop.app/mini/hello-world?shop_id=123&product_id=456&product_variant_id=789&order_id=123456

Params

ParamRequiredDescription
mini_handleYesYour Shop Mini's handle.
shop_idNoA shop identifier (integer). Depending on your Shop Mini's functionality this param might actually be required.
product_idNoA product identifier (integer). Depending on your Shop Mini's functionality this param might actually be required.
product_variant_idNoA product variant identifier (integer). Depending on your Shop Mini's functionality this param might actually be required.
shop_domainNoA shop's domain (string). Depending on your Shop Mini's functionality this param might actually be required.
order_idNoAn order identifier (integer). Depending on your Shop Mini's functionality this param might actually be required.

To fetch the metadata regarding how the logged user opened your Shop Mini, you can import the hook from useMinisParams from @shopify/shop-minis-platform-sdk.

const {entryPointParams, entryPoint} = useMinisParams()

// entryPointParams attributes will match the query params of the link:
console.log(entryPointParams)
// if the link "https://shop.app/mini/hello-world?shop_id=123&product_id=456&product_variant_id=789" was used:
// { shopGID: 'gid://shopify/Shop/123', productGID: 'gid://shopify/Product/456', productVariantGID: 'gid://shopify/ProductVariant/789'}

console.log(entryPoint)
// entryPoint will be null when the mini was opened via a link

Browser preview

For users without the app installed this link will load a landing page in the web browser referencing your Shop Mini, and the merchant if the shop_id param is present. This landing page will prompt users to download the Shop app as well.