Markus Michalski FAQ

Facebook Pixel: Events and data

Which events the Facebook Pixel plugin for Shopware 6.7 fires, when they fire and which data they transmit: PageView, ViewContent, ViewCategory, AddToCart, InitiateCheckout and Purchase.

Deutsche Version

Back to overview

Facebook Pixel: Events and data

Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net

Overview

Event When Switch Type
PageView Every rendered storefront page none (always active) Standard event
ViewContent Product detail page Track Product Views Standard event
ViewCategory Category page Track Categories Custom event (trackCustom)
AddToCart Cart page Track Add to Cart Standard event
InitiateCheckout Checkout confirmation page Track Checkout Standard event
Purchase Order finish page Track Orders Standard event

Prerequisite for all events: Enable Tracking is on and the Pixel ID is valid (digits only). Whether the events actually run in the browser is decided by consent, see Consent and cookies.

Common rules

PageView

Output on every storefront page together with the pixel base code. It carries no data except the event ID.

fbq('track', 'PageView', {eventID: '...'});

ViewContent

Field Content
content_name Product name in the context language
content_ids List with the product number
content_type product
value Unit price of the product (gross or net)
currency Currency code

ViewCategory

A custom event, which Meta does not treat as a standard event in its standard reporting. It has no content_type.

Field Content
content_name Category name
content_category Category name. The code builds the value from the category and its parent categories (separated by >), but loads the category without its parent association. As a rule, only the category's own name is therefore sent, without parent categories.
fbq('trackCustom', 'ViewCategory', {content_name: '...', content_category: '...'}, {eventID: '...'});

AddToCart

The event is tied to the cart page, not to the "add to cart" action. It fires on every view of the cart page.

On every view of the cart page, a separate AddToCart event with its own event ID is sent for each product line item in the cart. This covers all products currently in the cart, not just the one added last. Reloading the page fires the events again. A visitor who goes from the offcanvas cart straight to checkout without opening the cart page does not trigger AddToCart.

Field Content
content_ids List with the product number of the line item
content_name Label of the line item
content_type product
value Unit price times quantity
currency Currency code
num_items Quantity of the line item

InitiateCheckout

Fires once on the checkout confirmation page. It has no content_type.

Field Content
content_ids Product numbers of all product line items in the cart
num_items Sum of the quantities of all product line items
value Cart total (gross) or net total
currency Currency code

Purchase

Fires on the order finish page.

Field Content
content_ids Product numbers of all product line items of the order
content_type product
value Order total (gross) or net amount
currency Currency code
num_items Sum of the quantities of all product line items
order_id Order number, falling back to the internal order ID

What else is sent?

The fields above are the event data. What else goes to Meta, especially with the Conversions API (IP address, user agent, hashed email and phone number), is described on the Privacy page.