Reference

App proxy

Storefront widgets fetch campaign data through Shopify's App Proxy — a same-origin path that routes to our backend without breaking the customer's Shopify session.

Endpoint

  • Prefix: apps
  • Subpath: summer-upsell
  • Public URL: https://your-shop.myshopify.com/apps/summer-upsell/...

What it serves

GET requests return a JSON map of campaigns relevant to the current page context (product page, cart, or post-purchase). Query params include product_id, collection_ids, context, cart_product_ids, and order_product_ids.

POST requests record analytics events. type can be impression, atc, or conversion; the body includes campaignId and (for conversions) revenue.

Why a proxy?

  • The browser request stays on the shop domain — no CORS or third-party cookie issues.
  • Shopify signs every request with the shop's HMAC, so we can verify authenticity.
  • No leaking of the merchant's domain to a third-party host.