Postscript Headless Integrations
To use Postscript on a headless Shopify store, additional setup is required. This guide will walk you through the necessary steps.
Step 1: Install the Postscript Shopify App
Installing the app syncs customer, order, and other data with Postscript automatically.
Link: Install the Postscript Shopify App
Step 2: Install the Postscript SDK
Headless sites must manually load our JavaScript SDK. This enables Postscript popups, subscriber cookies, and necessary event tracking functions.
Link: Installing Postscript SDK
Step 3: Add Event Tracking
For headless sites, send events to Postscript when a visitor views a product page or adds a product to the cart. No additional events for checkout or purchases are needed.
Link: Adding Event Tracking
Step 4: Cookie Known Subscribers (Optional)
If you can identify a subscriber outside of Postscript (e.g., a logged-in customer with a stored phone number in Shopify), send that identity to Postscript.
Link: Cookie Subscribers
Step 5: Required Link Structure (Optional)
Postscript has the ability to send dynamically generated links to your store to subscribers based on their activity on the site. If you are not using Shopify standard URL structure you will need to either setup redirects for these links or not leverage these links in your Postscript automations.
The links that Postscript dynamically generates includes:
- Product Links - Links to your product pages
- These use the structure of
[site_url]/products/[product_handle]
. - Example:
https://mystore.com/products/red-shirt
- These use the structure of
- Cart Links - Link to a pre-created cart with
- These use the structure of
[site_url]/cart/[variant_id]:[quantity]?discount=[discount_code]
. - Example:
https://mystore.com/cart/36485954240671:1?disount=15off
- For more information on these links please see the Cart Permalinks article in the Shopify Help Center.
- These use the structure of
- Discount Links
- These use the structure of
[site_url]/discount/[discount_code]
- Example:
https://www.mystore.com/discount/15off
- These use the structure of
Updated about 2 months ago