Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/docs/campaigns/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions content/docs/campaigns/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/)",
Expand Down
2 changes: 1 addition & 1 deletion content/docs/campaigns/page-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.43"
}
}
```
Expand Down
8 changes: 5 additions & 3 deletions content/docs/campaigns/tracking/everflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down Expand Up @@ -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);
});
```
Expand Down
21 changes: 17 additions & 4 deletions content/docs/campaigns/tracking/meta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down Expand Up @@ -98,15 +98,27 @@ 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.

<Callout type="info" title="Campaign Cart SDK 0.5.1">
Comment thread
next-devin marked this conversation as resolved.
Resolved
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:
Comment thread
next-devin marked this conversation as resolved.
Resolved

- `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.
</Callout>

## Purchases and upsells

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` |
Expand Down Expand Up @@ -181,7 +193,8 @@ To test the Meta Pixel app as well:
<script>
window.nextReady = window.nextReady || [];
window.nextReady.push(function (next) {
next.addMetadata('fb_test_code', 'TEST12345');
if (next.actions && next.actions.setMetadata) next.actions.setMetadata({ fb_test_code: 'TEST12345' }); // SDK 0.5.1 and later
else next.addMetadata('fb_test_code', 'TEST12345'); // SDK 0.4.x
});
</script>
```
Expand Down