From f76ad8853161c0dec9da80ceaada5c5c7dfbfc09 Mon Sep 17 00:00:00 2001 From: Devin Michael Date: Mon, 9 Nov 2026 17:26:32 +0700 Subject: [PATCH 1/2] Campaigns: point Cart SDK links at the 0.5.0 docs layout --- content/docs/campaigns/index.mdx | 34 ++++++++-------- content/docs/campaigns/meta.json | 16 ++++---- content/docs/campaigns/page-kit.mdx | 2 +- netlify.toml | 63 +++++++++++++++-------------- 4 files changed, 59 insertions(+), 56 deletions(-) diff --git a/content/docs/campaigns/index.mdx b/content/docs/campaigns/index.mdx index ab1a113..97c3bfa 100644 --- a/content/docs/campaigns/index.mdx +++ b/content/docs/campaigns/index.mdx @@ -131,25 +131,25 @@ The pages above are wired up by the **Campaign Cart SDK**. Its documentation is | Reference | What it covers | | --- | --- | -| [Getting started](https://cart-sdk.nextcommerce.com/latest/start-here/getting-started/) | Loading the SDK and configuring it | -| [How it works](https://cart-sdk.nextcommerce.com/latest/start-here/how-it-works/) | Boot sequence and progressive enhancement | -| [Data attributes](https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/) | Every `data-next-*` attribute | -| [JavaScript API](https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/) | The `window.next` methods | -| [Analytics events](https://cart-sdk.nextcommerce.com/latest/reference/analytics-events/) | Every `dl_*` event and its payload | -| [URL parameters](https://cart-sdk.nextcommerce.com/latest/reference/url-parameters/) | Parameters the SDK reads at boot | -| [Window globals](https://cart-sdk.nextcommerce.com/latest/reference/window-globals/) | Configuration on `window` | -| [Debugger](https://cart-sdk.nextcommerce.com/latest/reference/debugger/) | The on-page debug overlay | +| [Quickstart](https://cart-sdk.nextcommerce.com/latest/quickstart) | Loading the SDK and configuring it | +| [Migrating from 0.4.x](https://cart-sdk.nextcommerce.com/latest/migrating-from-0-4) | What changed for pages built on 0.4.x: removed, deprecated, unchanged | +| [Attributes](https://cart-sdk.nextcommerce.com/latest/attributes) | Every `data-next-*` attribute | +| [JavaScript API](https://cart-sdk.nextcommerce.com/latest/javascript-api) | The `window.next` methods | +| [Events](https://cart-sdk.nextcommerce.com/latest/events) | Every `next.on` event and its payload | +| [Analytics](https://cart-sdk.nextcommerce.com/latest/analytics) | Tracking events, the `dl_*` pushes and the GTM, GA4, Meta and RudderStack destinations | +| [URL parameters](https://cart-sdk.nextcommerce.com/latest/attribute-reference/setup/url-parameters) | Parameters the SDK reads from the page URL | +| [Debugging](https://cart-sdk.nextcommerce.com/latest/javascript-api#debugging-with-debug1) | The debug panel opened with `?debug=1` | Building a specific funnel page: | Page | What it covers | | --- | --- | -| [Landing and presell](https://cart-sdk.nextcommerce.com/latest/pages/landing-presell/) | Selectors, bundles, add to cart | -| [Checkout page](https://cart-sdk.nextcommerce.com/latest/pages/checkout-page/) | Form fields, payment, express checkout | -| [Upsell page](https://cart-sdk.nextcommerce.com/latest/pages/upsell-page/) | Accept and decline flows | -| [Receipt page](https://cart-sdk.nextcommerce.com/latest/pages/receipt-page/) | Order data rendering | +| [Landing and presell](https://cart-sdk.nextcommerce.com/latest/building-pages/landing-and-presell) | Selectors, bundles, add to cart | +| [Checkout page](https://cart-sdk.nextcommerce.com/latest/building-pages/checkout-page) | Form fields, payment, express checkout | +| [Upsell page](https://cart-sdk.nextcommerce.com/latest/building-pages/upsell-page) | Post-purchase offers, accept and skip | +| [Receipt page](https://cart-sdk.nextcommerce.com/latest/building-pages/receipt-page) | Order data rendering | -Use the version selector on that site to read the docs for the SDK version your campaign loads. +Use the version selector on that site to read the docs for the SDK version your campaign loads. A campaign that still loads 0.4.x keeps working on it; its reference is the [0.4.43 docs](https://cart-sdk.nextcommerce.com/v0.4.43/), and [Migrating from 0.4.x](https://cart-sdk.nextcommerce.com/latest/migrating-from-0-4) lists what to change before moving it to 0.5. --- @@ -254,7 +254,7 @@ Requests from domains not listed in either production or development will be rej ## Analytics & Tracking -Every starter template ships with NEXT Campaign Analytics **on by default** in auto mode. The SDK automatically tracks the full funnel — page views, add-to-cart, begin checkout, shipping/payment info, purchase, and upsells — through the always-on internal `nextCampaign` provider. No code required. +Every starter template ships with NEXT Campaign Analytics **on by default**. The SDK automatically tracks the full funnel — page views, add-to-cart, begin checkout, shipping/payment info, purchase, and upsells — through the always-on internal `nextCampaign` provider. No code required. To also forward those events to **Google Tag Manager** or **Facebook Pixel**, add your IDs in `_data/campaigns.json`: @@ -270,20 +270,20 @@ To also forward those events to **Google Tag Manager** or **Facebook Pixel**, ad ``` -The matching `providers.gtm.enabled` and `providers.facebook.enabled` flags in `assets/config.js` control whether the SDK **forwards events** to each provider. Templates ship with these set to `false` — flip them to `true` once your IDs are in place. See the per-provider guides below for the full wiring. +Whether the SDK **forwards events** to each vendor is set under `analytics.destinations` in `assets/config.js`: `destinations.gtm.enabled` and `destinations.meta.enabled` (Campaign Cart SDK 0.5 and later). Templates built for 0.4.x set the older `providers.gtm.enabled` and `providers.facebook.enabled` flags to `false`; 0.5 still reads them, so flip them to `true` once your IDs are in place. See [Destinations](https://cart-sdk.nextcommerce.com/latest/analytics-reference/destinations/overview) for every destination and its config. Two mechanisms skip tracking entirely — including the always-on internal `nextCampaign` provider — so your campaign dashboards reflect **real customer conversions**, not internal QA or test traffic: - **Development domains** — any domain marked *development* in your store's Campaign Settings suppresses all events. Add `localhost`, staging URLs, and preview hosts here. -- **`?ignore=true` URL parameter** — append it to any URL to silence tracking for the entire session, useful for one-off testing on a production domain. Clear it with `window.NextAnalyticsClearIgnore()`. +- **`?ignore=true` URL parameter** — append it to any URL to silence tracking for the entire session, useful for one-off testing on a production domain. Turn tracking back on with `?ignore=false` (or `?reset=1`). ### Event reference -- [Analytics events](https://cart-sdk.nextcommerce.com/latest/reference/analytics-events/) — every `dl_*` event the SDK emits, which ones fire automatically, and what each provider receives +- [Analytics](https://cart-sdk.nextcommerce.com/latest/analytics) — every tracking event the SDK sends, the `dl_*` push each one makes, and what each destination receives --- diff --git a/content/docs/campaigns/meta.json b/content/docs/campaigns/meta.json index 53dfe64..913886e 100644 --- a/content/docs/campaigns/meta.json +++ b/content/docs/campaigns/meta.json @@ -11,14 +11,14 @@ "[Playground](/playground)", "---Cart SDK---", "external:[SDK documentation](https://cart-sdk.nextcommerce.com/latest/)", - "external:[Getting started](https://cart-sdk.nextcommerce.com/latest/start-here/getting-started/)", - "external:[How it works](https://cart-sdk.nextcommerce.com/latest/start-here/how-it-works/)", - "external:[Data attributes](https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/)", - "external:[JavaScript API](https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/)", - "external:[Analytics events](https://cart-sdk.nextcommerce.com/latest/reference/analytics-events/)", - "external:[URL parameters](https://cart-sdk.nextcommerce.com/latest/reference/url-parameters/)", - "external:[Window globals](https://cart-sdk.nextcommerce.com/latest/reference/window-globals/)", - "external:[Debugger](https://cart-sdk.nextcommerce.com/latest/reference/debugger/)", + "external:[Quickstart](https://cart-sdk.nextcommerce.com/latest/quickstart)", + "external:[Migrating from 0.4.x](https://cart-sdk.nextcommerce.com/latest/migrating-from-0-4)", + "external:[Attributes](https://cart-sdk.nextcommerce.com/latest/attributes)", + "external:[JavaScript API](https://cart-sdk.nextcommerce.com/latest/javascript-api)", + "external:[Events](https://cart-sdk.nextcommerce.com/latest/events)", + "external:[Analytics](https://cart-sdk.nextcommerce.com/latest/analytics)", + "external:[URL parameters](https://cart-sdk.nextcommerce.com/latest/attribute-reference/setup/url-parameters)", + "external:[Debugging](https://cart-sdk.nextcommerce.com/latest/javascript-api#debugging-with-debug1)", "---API References---", "api", "admin-api" diff --git a/content/docs/campaigns/page-kit.mdx b/content/docs/campaigns/page-kit.mdx index b68f7df..76f6176 100644 --- a/content/docs/campaigns/page-kit.mdx +++ b/content/docs/campaigns/page-kit.mdx @@ -366,7 +366,7 @@ Then add an entry keyed by slug: "my-campaign": { "name": "My Campaign", "description": "My first campaign", - "sdk_version": "0.4.18" + "sdk_version": "0.5.0" } } ``` diff --git a/netlify.toml b/netlify.toml index 6d26a11..36ba822 100644 --- a/netlify.toml +++ b/netlify.toml @@ -148,6 +148,9 @@ # Campaigns SDK reference moved to cart-sdk.nextcommerce.com # +# Targets follow the 0.5.0 docs layout (November 2026); the 0.4 paths under +# /latest/reference/, /latest/start-here/ and /latest/pages/ now 404 there. +# # Cloudflare counts every cross-host redirect as a *dynamic* rule and caps those at # 100 per _redirects file. An earlier version of this block enumerated all 138 old # paths and was rejected at deploy time with @@ -177,147 +180,147 @@ [[redirects]] from = "/docs/campaigns/utilities/debugger" - to = "https://cart-sdk.nextcommerce.com/latest/reference/debugger/" + to = "https://cart-sdk.nextcommerce.com/latest/javascript-api#debugging-with-debug1" status = 301 [[redirects]] from = "/docs/campaigns/utilities/debugger/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/debugger/" + to = "https://cart-sdk.nextcommerce.com/latest/javascript-api#debugging-with-debug1" status = 301 [[redirects]] from = "/docs/campaigns/utilities/exit-intent" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/#on-page-popups" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/promotion" status = 301 [[redirects]] from = "/docs/campaigns/utilities/exit-intent/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/#on-page-popups" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/promotion" status = 301 [[redirects]] from = "/docs/campaigns/utilities/loading-states" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#hiding-placeholders-until-prices-load" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/setup/page-state" status = 301 [[redirects]] from = "/docs/campaigns/utilities/loading-states/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#hiding-placeholders-until-prices-load" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/setup/page-state" status = 301 [[redirects]] from = "/docs/campaigns/analytics" - to = "https://cart-sdk.nextcommerce.com/latest/reference/analytics-events/" + to = "https://cart-sdk.nextcommerce.com/latest/analytics" status = 301 [[redirects]] from = "/docs/campaigns/analytics/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/analytics-events/" + to = "https://cart-sdk.nextcommerce.com/latest/analytics" status = 301 [[redirects]] from = "/docs/campaigns/bundle-selector" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#bundle-selector" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/selector" status = 301 [[redirects]] from = "/docs/campaigns/bundle-selector/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#bundle-selector" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/selector" status = 301 [[redirects]] from = "/docs/campaigns/cart-summary" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#cart-summary" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/cart" status = 301 [[redirects]] from = "/docs/campaigns/cart-summary/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#cart-summary" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/cart" status = 301 [[redirects]] from = "/docs/campaigns/cart-system" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/#cart-operations" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/cart" status = 301 [[redirects]] from = "/docs/campaigns/cart-system/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/#cart-operations" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/objects/cart" status = 301 [[redirects]] from = "/docs/campaigns/checkout" - to = "https://cart-sdk.nextcommerce.com/latest/pages/checkout-page/" + to = "https://cart-sdk.nextcommerce.com/latest/building-pages/checkout-page" status = 301 [[redirects]] from = "/docs/campaigns/checkout/*" - to = "https://cart-sdk.nextcommerce.com/latest/pages/checkout-page/" + to = "https://cart-sdk.nextcommerce.com/latest/building-pages/checkout-page" status = 301 [[redirects]] from = "/docs/campaigns/configuration" - to = "https://cart-sdk.nextcommerce.com/latest/reference/window-globals/#windownextconfig" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/setup/loader-script" status = 301 [[redirects]] from = "/docs/campaigns/configuration/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/window-globals/#windownextconfig" + to = "https://cart-sdk.nextcommerce.com/latest/attribute-reference/setup/loader-script" status = 301 [[redirects]] from = "/docs/campaigns/data-attributes" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/" + to = "https://cart-sdk.nextcommerce.com/latest/attributes" status = 301 [[redirects]] from = "/docs/campaigns/data-attributes/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/" + to = "https://cart-sdk.nextcommerce.com/latest/attributes" status = 301 [[redirects]] from = "/docs/campaigns/guides" - to = "https://cart-sdk.nextcommerce.com/latest/start-here/getting-started/" + to = "https://cart-sdk.nextcommerce.com/latest/quickstart" status = 301 [[redirects]] from = "/docs/campaigns/guides/*" - to = "https://cart-sdk.nextcommerce.com/latest/start-here/getting-started/" + to = "https://cart-sdk.nextcommerce.com/latest/quickstart" status = 301 [[redirects]] from = "/docs/campaigns/javascript-api" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/" + to = "https://cart-sdk.nextcommerce.com/latest/javascript-api" status = 301 [[redirects]] from = "/docs/campaigns/javascript-api/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/" + to = "https://cart-sdk.nextcommerce.com/latest/javascript-api" status = 301 [[redirects]] from = "/docs/campaigns/package-toggle" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#order-bumps" + to = "https://cart-sdk.nextcommerce.com/latest/recipes/order-bump" status = 301 [[redirects]] from = "/docs/campaigns/package-toggle/*" - to = "https://cart-sdk.nextcommerce.com/latest/reference/data-attributes/#order-bumps" + to = "https://cart-sdk.nextcommerce.com/latest/recipes/order-bump" status = 301 [[redirects]] from = "/docs/campaigns/upsells" - to = "https://cart-sdk.nextcommerce.com/latest/pages/upsell-page/" + to = "https://cart-sdk.nextcommerce.com/latest/building-pages/upsell-page" status = 301 [[redirects]] from = "/docs/campaigns/upsells/*" - to = "https://cart-sdk.nextcommerce.com/latest/pages/upsell-page/" + to = "https://cart-sdk.nextcommerce.com/latest/building-pages/upsell-page" status = 301 [[redirects]] from = "/docs/campaigns/utilities" - to = "https://cart-sdk.nextcommerce.com/latest/reference/javascript-api/#utilities" + to = "https://cart-sdk.nextcommerce.com/latest/javascript-api" status = 301 # The bare campaign-cart index needs its own rule: /docs/campaigns/campaign-cart/:path @@ -325,7 +328,7 @@ [[redirects]] from = "/docs/campaigns/campaign-cart" - to = "https://cart-sdk.nextcommerce.com/latest/start-here/how-it-works/" + to = "https://cart-sdk.nextcommerce.com/latest/" status = 301 # Old Redoc-style reference URL still linked from the platform changelog. From e4cf875d34ae9a04edb086a3a79c78f79867820b Mon Sep 17 00:00:00 2001 From: Devin Michael Date: Mon, 9 Nov 2026 19:24:17 +0700 Subject: [PATCH 2/2] Campaigns: settle destinations vs providers precedence, drop ?reset=1 --- content/docs/campaigns/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/campaigns/index.mdx b/content/docs/campaigns/index.mdx index 574dc75..a2faeda 100644 --- a/content/docs/campaigns/index.mdx +++ b/content/docs/campaigns/index.mdx @@ -271,14 +271,14 @@ To also forward those events to **Google Tag Manager** or **Facebook Pixel**, ad ``` -Whether the SDK **forwards events** to each vendor is set under `analytics.destinations` in `assets/config.js`: `destinations.gtm.enabled` and `destinations.meta.enabled` (Campaign Cart SDK 0.5 and later). Templates built for 0.4.x set the older `providers.gtm.enabled` and `providers.facebook.enabled` flags to `false`; 0.5 still reads them, so flip them to `true` once your IDs are in place. See [Destinations](https://cart-sdk.nextcommerce.com/latest/analytics-reference/destinations/overview/) for every destination and its config. +The IDs above load the GTM container and Meta Pixel on your pages. Whether the SDK also **forwards its events** to them is a separate switch in `assets/config.js`. On Campaign Cart SDK 0.5, set `analytics.destinations.gtm.enabled` and `analytics.destinations.meta.enabled` to `true`; the Meta destination sends to the Pixel your page loads from `fb_pixel_id`. Templates built for 0.4.x use the older `analytics.providers.gtm` and `analytics.providers.facebook` flags instead. 0.5 still reads them, but when both are set, `destinations` wins. See [Destinations](https://cart-sdk.nextcommerce.com/latest/analytics-reference/destinations/overview/) for every destination and its config. Two mechanisms skip tracking entirely — including the always-on internal `nextCampaign` provider — so your campaign dashboards reflect **real customer conversions**, not internal QA or test traffic: - **Development domains** — any domain marked *development* in your store's Campaign Settings suppresses all events. Add `localhost`, staging URLs, and preview hosts here. -- **`?ignore=true` URL parameter** — append it to any URL to silence tracking for the entire session, useful for one-off testing on a production domain. Turn tracking back on with `?ignore=false` (or `?reset=1`). +- **`?ignore=true` URL parameter** — append it to any URL to silence tracking for the rest of that browser tab, useful for one-off testing on a production domain. Turn tracking back on with `?ignore=false`.