> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sideshift.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform setup

> Connect a custom website, tag manager, hosted storefront, or headless checkout.

Every custom-store integration needs both a consented browser installation and a trusted server order feed. A page-builder script alone cannot verify payment. Start with [installation](/pixel/installation) and the [Orders API](/pixel/orders-api).

| Platform | Browser setup | Verified orders |
| - | - | - |
| Custom website or Next.js/React | Add the script once to your shared layout. Connect consent; capture identity before redirecting to checkout. | Persist identity with the checkout session. Submit orders from verified payment webhooks or your trusted order service. |
| WordPress / WooCommerce | Add the snippet through your theme or managed script integration; connect your consent manager. Map product/cart actions to SDK calls. | Implement a server plugin or webhook receiver that reads authoritative paid orders and refunds, preserves original payment time, and calls the Orders API. No automatic plugin is implied. |
| Webflow / Squarespace / other page builders | Add the snippet to site-wide custom code where the plan permits it. | Use the checkout provider's verified webhooks through your server. Ensure it can carry visitor metadata; a browser success page is insufficient. |
| Google Tag Manager | Use a consent-gated Custom HTML tag and data-layer events after the script is ready. | Your server still sends orders. Never place the secret Orders API key in GTM. |
| Hosted checkout on another domain | Capture identity on the storefront and attach it to the checkout session through your backend. | Recover that metadata from verified server callbacks. Do not assume cookies transfer across domains. |
| Shopify | Use the Shopify integration when available and authorized. Headless pages also need a storefront pixel. | The authorized app handles order verification and refunds. Availability depends on Shopify app approval and merchant setup. |

## Single-page apps

Install once at the application root. The pixel observes browser history changes; call `pageView()` for routing mechanisms it cannot observe. Do not reload the script for every component render. Query-only changes on the same path do not generate another page view, but a new creator `ss` code can still record a click.

## Checkout handoff

Capture `getVisitorId()` and optional `getAdvertisingContextAsync()` before creating the checkout. Persist them against your internal checkout ID on the server. After verifying the payment callback's signature and paid state, retrieve those saved values and build the Orders API request from authoritative order data. Use an order ID stable across webhook retries and refunds.

When consent is withdrawn, clear attribution metadata from your pending checkout as appropriate. If the checkout provider cannot preserve an ID or join back to your server session, that checkout cannot reliably attribute the order. Resolve that handoff before launching a commission campaign.

## Shopify and headless storefronts

Shopify app installation, product sync, fulfillment, and signed order webhooks are separate from the generic pixel. Do not submit app-managed Shopify orders through the custom-store Orders API.

For an authorized headless Shopify integration, `shopifyCartAttributes(existingAttributes)` preserves existing attributes and adds `sideshift_visitor_id`. Save the resulting attributes with your existing Storefront API client before redirecting to checkout; check API errors. Update them again on consent withdrawal to clear the visitor value. This helper does not install the Shopify app or establish cross-domain advertising context by itself.
