Skip to content

Google Analytics and Meta Pixel ​

NXCart reports what shoppers do in your shop to Google Analytics 4 and, if you use it, a Meta Pixel: which products they look at, what they add to the cart, how far they get in checkout, and what they buy.

Setting it up ​

Go to NXCart → Settings → General → Analytics and choose how to connect Google Analytics:

  • Through Google Tag Manager. Choose this if your site already loads Google Tag Manager, for example from your template or another extension. NXCart adds the shop events to Tag Manager's dataLayer, in the format Google's ecommerce tags expect. Set up the GA4 event tags, and your cookie consent, in your Tag Manager container.
  • Directly, with a Measurement ID. NXCart loads Google Analytics itself. Enter the Measurement ID from Google Analytics (Admin → Data streams → your web stream); it starts with G-. Do not also add the Google tag to your template, or visits are counted twice.

For a Meta Pixel, enter its ID (a number). Both can be used together.

What is reported ​

EventWhen
view_item_listA category or All products page shows products (and each time Load more adds some)
select_itemA shopper opens a product from such a list
view_itemA product page is opened
add_to_cartA product is added, or its quantity raised in the cart
remove_from_cartA product is removed, or its quantity lowered
view_cartThe cart page is opened
begin_checkoutThe checkout page is opened
add_shipping_info, add_payment_infoThe shopper picks a shipping or payment method, or places the order
purchaseThe order page after checkout, once per order

A purchase is reported when the order is paid, or straight away for bank transfer and cash on delivery orders. Opening the order page again never reports it twice. Orders placed before you turned analytics on are never reported.

Products are identified by their variant ID, the same ID the Google Merchant feed uses, so Google can link the two.

The Meta Pixel gets the events Meta has a standard event for: ViewContent, AddToCart, InitiateCheckout, AddPaymentInfo and Purchase.

Shoppers in the EU and UK have to agree before they are tracked. NXCart uses Google Consent Mode for this:

  • Until the shopper answers your cookie banner, Google Analytics gets only cookieless signals and the Meta Pixel sends nothing.
  • Your cookie banner reports the answer by calling:
js
window.nxcartConsent({ analytics: true, ads: false });

analytics is permission for statistics, ads for advertising (Google Ads and the Meta Pixel). Many consent extensions let you run a script when a shopper accepts a category; call it there. Banners that already update Google Consent Mode work for Google Analytics too.

If your shop does not need consent, tick My shoppers do not need to consent to tracking. Tracking then starts at once.

With Google Tag Manager, consent is handled in your container, not by NXCart.