From e7c845db7c791bbf386641bbf54d55934001b640 Mon Sep 17 00:00:00 2001 From: Devin Michael Date: Thu, 26 Nov 2026 16:52:55 +0700 Subject: [PATCH 1/4] Campaign Cart SDK 0.5.1: What's new link, 0.5.1 Meta events, Everflow setMetadata, sdk_version example --- content/docs/campaigns/index.mdx | 1 + content/docs/campaigns/meta.json | 1 + content/docs/campaigns/page-kit.mdx | 2 +- content/docs/campaigns/tracking/everflow.mdx | 8 +++++--- content/docs/campaigns/tracking/meta.mdx | 14 +++++++++++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/content/docs/campaigns/index.mdx b/content/docs/campaigns/index.mdx index 245018ec..9db0be8a 100644 --- a/content/docs/campaigns/index.mdx +++ b/content/docs/campaigns/index.mdx @@ -133,6 +133,7 @@ The pages above are wired up by the **Campaign Cart SDK**. Its documentation is | --- | --- | | [Getting started](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 | +| [What's new in 0.5.1](https://cart-sdk.nextcommerce.com/latest/whats-new-in-0-5-1/) | What 0.5.1 changes from 0.5.0, and what to check before you upgrade | | [Data 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 | diff --git a/content/docs/campaigns/meta.json b/content/docs/campaigns/meta.json index 4a739a85..05689054 100644 --- a/content/docs/campaigns/meta.json +++ b/content/docs/campaigns/meta.json @@ -14,6 +14,7 @@ "external:[SDK documentation](https://cart-sdk.nextcommerce.com/latest/)", "external:[Getting started](https://cart-sdk.nextcommerce.com/latest/quickstart/)", "external:[Migrating from 0.4.x](https://cart-sdk.nextcommerce.com/latest/migrating-from-0-4/)", + "external:[What's new in 0.5.1](https://cart-sdk.nextcommerce.com/latest/whats-new-in-0-5-1/)", "external:[Data 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/)", diff --git a/content/docs/campaigns/page-kit.mdx b/content/docs/campaigns/page-kit.mdx index 76f61765..30c540be 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.5.0" + "sdk_version": "0.5.1" } } ``` diff --git a/content/docs/campaigns/tracking/everflow.mdx b/content/docs/campaigns/tracking/everflow.mdx index 4ab3dd12..61fa3be2 100644 --- a/content/docs/campaigns/tracking/everflow.mdx +++ b/content/docs/campaigns/tracking/everflow.mdx @@ -3,7 +3,7 @@ title: Everflow description: Report NEXT Campaigns sales to Everflow with the Everflow app, for both redirect links and direct links, and avoid duplicate or missing conversions. sidebar_label: Everflow audience: [merchant, developer] -last_verified: 2026-11-16 +last_verified: 2026-11-26 tags: - Guide --- @@ -90,9 +90,11 @@ EF.click({ // Put the ID on the order. var apply = function (next) { - next.setMetadata({ everflow_transaction_id: id }); + var metadata = { everflow_transaction_id: id }; + if (next.actions && typeof next.actions.setMetadata === 'function') next.actions.setMetadata(metadata); // SDK 0.5.1 and later + else if (typeof next.setMetadata === 'function') next.setMetadata(metadata); // SDK 0.4.x }; - if (window.next && typeof window.next.setMetadata === 'function') apply(window.next); + if (window.next && ((window.next.actions && window.next.actions.setMetadata) || typeof window.next.setMetadata === 'function')) apply(window.next); else (window.nextReady = window.nextReady || []).push(apply); }); ``` diff --git a/content/docs/campaigns/tracking/meta.mdx b/content/docs/campaigns/tracking/meta.mdx index 73e86aa7..2b464267 100644 --- a/content/docs/campaigns/tracking/meta.mdx +++ b/content/docs/campaigns/tracking/meta.mdx @@ -3,7 +3,7 @@ title: Meta Pixel and Conversions API description: Track your NEXT campaign in Meta. Turn on the Meta pixel on your campaign pages, send purchases from NEXT's servers with the Meta Pixel app, and make sure Meta counts each purchase once. sidebar_label: Meta audience: [merchant, developer] -last_verified: 2026-11-16 +last_verified: 2026-11-26 tags: - Guide --- @@ -100,6 +100,18 @@ See the [Meta Pixel app docs](https://docs.nextcommerce.com/docs/apps/meta-pixel The `Purchase` is sent on the first page after payment: the upsell page, or the receipt if there is no upsell. + +The table above is for SDK 0.4.x, which the starter templates use. On SDK 0.5.1 the pixel gets these events instead: + +- `PageView`, `ViewContent`, `InitiateCheckout` and `AddPaymentInfo`, as above. +- `AddToCart` for the first item added in a session only. +- `Lead` when the shopper's contact details are saved at checkout. +- `Purchase` once per order, on the checkout page when the order is paid there. None is sent when an upsell is accepted. +- No `RemoveFromCart`, `AddShippingInfo`, `ViewedUpsell` or `SkippedUpsell`. + +The SDK sends `PageView` itself on every page, so remove `fbq('track', 'PageView')` from your pixel base code or it is sent twice. + + ## Purchases and upsells The browser and the server report the same purchase with different amounts. From 4128e606d1cd8421090865bfece173e66b5c7a6a Mon Sep 17 00:00:00 2001 From: Devin Michael Date: Thu, 26 Nov 2026 17:35:10 +0700 Subject: [PATCH 2/4] Meta guide: label Purchase timing by SDK version; 0.5.1 test-code snippet --- content/docs/campaigns/tracking/meta.mdx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/docs/campaigns/tracking/meta.mdx b/content/docs/campaigns/tracking/meta.mdx index 2b464267..abfc56cf 100644 --- a/content/docs/campaigns/tracking/meta.mdx +++ b/content/docs/campaigns/tracking/meta.mdx @@ -98,7 +98,7 @@ See the [Meta Pixel app docs](https://docs.nextcommerce.com/docs/apps/meta-pixel | An upsell page is shown | `ViewedUpsell` (custom event) | | An upsell is declined | `SkippedUpsell` (custom event) | -The `Purchase` is sent on the first page after payment: the upsell page, or the receipt if there is no upsell. +On SDK 0.4.x the `Purchase` is sent on the first page after payment: the upsell page, or the receipt if there is no upsell. On 0.5.1 it is usually sent earlier, as the note below says. The table above is for SDK 0.4.x, which the starter templates use. On SDK 0.5.1 the pixel gets these events instead: @@ -118,7 +118,7 @@ The browser and the server report the same purchase with different amounts. | | Meta pixel (browser) | Meta Pixel app (server) | | --- | --- | --- | -| When | The first page after payment | 10 minutes after the order, with the delay on | +| When | On SDK 0.4.x, the first page after payment. On 0.5.1, the checkout page when the order is paid there | 10 minutes after the order, with the delay on | | Amount | The price of the items in the first sale, as shown on your store, without shipping | The full order total, including tax and shipping | | Upsells | Not included | Included, when accepted within the 10 minutes | | ID | `your-store-100041` | `your-store-100041` | @@ -193,7 +193,8 @@ To test the Meta Pixel app as well: ``` From b6ef66a50cea50debc77d7ecb61eb87fd84a6d19 Mon Sep 17 00:00:00 2001 From: Devin Michael Date: Fri, 27 Nov 2026 03:41:27 +0700 Subject: [PATCH 3/4] Page kit: sdk_version example matches the starter templates (0.4.43) --- content/docs/campaigns/page-kit.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/campaigns/page-kit.mdx b/content/docs/campaigns/page-kit.mdx index 30c540be..c323f66a 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.5.1" + "sdk_version": "0.4.43" } } ``` From d0f48bc273769bb35be53228a507753dd8aba7df Mon Sep 17 00:00:00 2001 From: Devin Michael Date: Thu, 3 Dec 2026 10:58:57 +0700 Subject: [PATCH 4/4] Campaign Cart SDK 0.5.2: starter templates load 0.5.2; What's new in 0.5.2 link; 0.5.1 Meta notes apply to 0.5.1 and later --- content/docs/campaigns/index.mdx | 1 + content/docs/campaigns/meta.json | 1 + content/docs/campaigns/page-kit.mdx | 2 +- content/docs/campaigns/tracking/index.mdx | 2 +- content/docs/campaigns/tracking/meta.mdx | 8 ++++---- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/content/docs/campaigns/index.mdx b/content/docs/campaigns/index.mdx index 9db0be8a..0d860424 100644 --- a/content/docs/campaigns/index.mdx +++ b/content/docs/campaigns/index.mdx @@ -133,6 +133,7 @@ The pages above are wired up by the **Campaign Cart SDK**. Its documentation is | --- | --- | | [Getting started](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 | +| [What's new in 0.5.2](https://cart-sdk.nextcommerce.com/latest/whats-new-in-0-5-2/) | What 0.5.2 changes from 0.5.1: block lists for every destination, translatable checkout texts | | [What's new in 0.5.1](https://cart-sdk.nextcommerce.com/latest/whats-new-in-0-5-1/) | What 0.5.1 changes from 0.5.0, and what to check before you upgrade | | [Data 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 | diff --git a/content/docs/campaigns/meta.json b/content/docs/campaigns/meta.json index 05689054..0495ee7b 100644 --- a/content/docs/campaigns/meta.json +++ b/content/docs/campaigns/meta.json @@ -14,6 +14,7 @@ "external:[SDK documentation](https://cart-sdk.nextcommerce.com/latest/)", "external:[Getting started](https://cart-sdk.nextcommerce.com/latest/quickstart/)", "external:[Migrating from 0.4.x](https://cart-sdk.nextcommerce.com/latest/migrating-from-0-4/)", + "external:[What's new in 0.5.2](https://cart-sdk.nextcommerce.com/latest/whats-new-in-0-5-2/)", "external:[What's new in 0.5.1](https://cart-sdk.nextcommerce.com/latest/whats-new-in-0-5-1/)", "external:[Data attributes](https://cart-sdk.nextcommerce.com/latest/attributes/)", "external:[JavaScript API](https://cart-sdk.nextcommerce.com/latest/javascript-api/)", diff --git a/content/docs/campaigns/page-kit.mdx b/content/docs/campaigns/page-kit.mdx index c323f66a..d7857105 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.43" + "sdk_version": "0.5.2" } } ``` diff --git a/content/docs/campaigns/tracking/index.mdx b/content/docs/campaigns/tracking/index.mdx index 7dce258f..350d863f 100644 --- a/content/docs/campaigns/tracking/index.mdx +++ b/content/docs/campaigns/tracking/index.mdx @@ -62,7 +62,7 @@ Some platforms can receive the shopper's email and phone to improve matching. Th ## For developers -The campaign's own events, their fields, and the ad details saved on each order are documented in the Campaign Cart SDK reference. The starter templates use SDK 0.4.43, so use the 0.4.43 pages: +The campaign's own events, their fields, and the ad details saved on each order are documented in the Campaign Cart SDK reference. The starter templates load SDK 0.5.2, documented in [How analytics works](https://cart-sdk.nextcommerce.com/latest/analytics-reference/how-it-works/), [Destinations](https://cart-sdk.nextcommerce.com/latest/analytics-reference/destinations/overview/), [Events](https://cart-sdk.nextcommerce.com/latest/events/) and the [JavaScript API](https://cart-sdk.nextcommerce.com/latest/javascript-api/). A campaign that still loads 0.4.x uses the 0.4.43 pages: | What you need | SDK reference | | --- | --- | diff --git a/content/docs/campaigns/tracking/meta.mdx b/content/docs/campaigns/tracking/meta.mdx index abfc56cf..33d3b168 100644 --- a/content/docs/campaigns/tracking/meta.mdx +++ b/content/docs/campaigns/tracking/meta.mdx @@ -98,10 +98,10 @@ See the [Meta Pixel app docs](https://docs.nextcommerce.com/docs/apps/meta-pixel | An upsell page is shown | `ViewedUpsell` (custom event) | | An upsell is declined | `SkippedUpsell` (custom event) | -On SDK 0.4.x the `Purchase` is sent on the first page after payment: the upsell page, or the receipt if there is no upsell. On 0.5.1 it is usually sent earlier, as the note below says. +On SDK 0.4.x the `Purchase` is sent on the first page after payment: the upsell page, or the receipt if there is no upsell. On 0.5.1 and later it is usually sent earlier, as the note below says. - -The table above is for SDK 0.4.x, which the starter templates use. On SDK 0.5.1 the pixel gets these events instead: + +The table above is for SDK 0.4.x. The starter templates load SDK 0.5.2, and on 0.5.1 and later the pixel gets these events instead: - `PageView`, `ViewContent`, `InitiateCheckout` and `AddPaymentInfo`, as above. - `AddToCart` for the first item added in a session only. @@ -118,7 +118,7 @@ The browser and the server report the same purchase with different amounts. | | Meta pixel (browser) | Meta Pixel app (server) | | --- | --- | --- | -| When | On SDK 0.4.x, the first page after payment. On 0.5.1, the checkout page when the order is paid there | 10 minutes after the order, with the delay on | +| When | On SDK 0.4.x, the first page after payment. On 0.5.1 and later, the checkout page when the order is paid there | 10 minutes after the order, with the delay on | | Amount | The price of the items in the first sale, as shown on your store, without shipping | The full order total, including tax and shipping | | Upsells | Not included | Included, when accepted within the 10 minutes | | ID | `your-store-100041` | `your-store-100041` |