> ## 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.

# Advertising measurement

> Use the same installation for independent attribution and supported managed-ad signals.

The pixel works without an advertising destination. Connecting a SideShift-provided ad account to the store enables an optional destination for supported consented browser events and verified server purchases. You do not install a second pixel snippet for this integration.

## Event mapping

| SideShift browser call | Advertising event |
| - | - |
| `pageView()` | `page` |
| `productViewed(...)` | `view_content` |
| `addToCart(...)` | `add_to_cart` |
| `checkoutStarted(...)` | `initiate_checkout` |
| `track('lead', ...)`, `track('contact', ...)`, other supported custom names | Corresponding event name |
| `checkout(...)` | SideShift browser diagnostic only; no advertising purchase |
| Verified server order | Purchase, when eligible for the connected destination |

## Preserve advertising context

```javascript theme={"system"}
const visitorId = window.sideshift?.getVisitorId();
const advertising = await window.sideshift?.getAdvertisingContextAsync();
// Persist both with your existing checkout on the server.
```

Send `visitorId` as the order's top-level SideShift identity. Send the returned context unchanged as the optional `advertising` object on the Orders API request:

```json theme={"system"}
{
  "visitorId": "ADVERTISING_VISITOR_ID",
  "landingUrl": "https://store.example.com/product?ss=CREATOR_CODE&fbclid=CLICK_ID",
  "capturedAt": "2026-09-11T12:00:00Z"
}
```

This object is nested under `advertising`, not the entire order body. Its `visitorId` is 1–64 characters. `landingUrl` must be the original HTTPS landing URL, at most 4,096 characters, with no fragment or URL credentials. Preserve advertising click parameters. `capturedAt` is an ISO UTC timestamp. Do not fabricate either identity when context is unavailable.

Eligible delivery currently requires a connected destination, a positive USD order, a purchase no more than 28 days old and valid advertising context captured within 28 days before purchase, and a non-sample, non-cancelled order. That advertising context window does not extend SideShift's seven-day creator attribution window. Delivery is asynchronous. Refunds update SideShift commission accounting; they are not emitted as an invented advertising refund event.

## Consent and customer matching

The optional SDK loads only after consent. Explicit customer-matching fields on supported browser calls may be forwarded to the advertising destination: `email`, `first_name`, `last_name`, `name`, `phone`, `external_id`, `city`, `state`, `postal_code`, and `country`. These are not stored in SideShift's generic browser-event properties. Supply them only when your consent and data-use permissions allow it; they are not required for independent SideShift attribution.

The current advertising SDK is served from `https://t.whop.tw/s.js`. A restrictive CSP must allow its required script and event connections. The provider may appear in browser network tools or authorization screens even though installation and setup use SideShift.

Automatic form, iframe, link, and URL-identity collection are disabled by this wrapper. One managed destination is bound to a store; this is not arbitrary multi-account event fan-out. Revoking SideShift consent stops SideShift's forwarding, but does not control a separate SDK independently installed by your site.

## Validation

Use **Check installation** in the SideShift-provided account setup after a consented page view. Validation checks recent provider activity and reachability; a passing pixel check does not prove purchase attribution or commissions. Follow the [complete test sequence](/pixel/testing).

For your own Meta account, keep your existing Meta pixel/Conversions API for optimization. SideShift's independent order attribution does not automatically populate your Meta dataset. Cross-domain checkout continuity also requires an explicit integration; browser cookies do not automatically cross unrelated domains.
