Markus Michalski FAQ

Facebook Pixel: Configuration

All settings of the Facebook Pixel (Meta Pixel) plugin for Shopware 6.7: Pixel ID, tracking options, Conversions API, Klaro integration and connection test, with defaults and practical examples.

Deutsche Version

Back to overview

Facebook Pixel: Configuration

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

Where to find the settings

In the Shopware Admin, go to Extensions > My extensions and click Configure on the Facebook Pixel (Meta Pixel) plugin. At the top you choose whether the values apply to all sales channels or to a single sales channel. Every setting can be overridden per sales channel.

Facebook Pixel Options

Setting Key Default Description
Pixel ID pixelId empty The Pixel ID from Meta Events Manager. Required, digits only. If the value contains anything other than digits, nothing is output at all.
Enable Tracking trackingEnabled Off Master switch. When off, the plugin renders nothing and sends no server-side events.
Require Cookie Consent requireCookieConsent Off Pixel and Conversions API only after consent. Consent is detected through cookies, see Consent and cookies. Has no effect when the Klaro integration is active.

Tracking Options

Setting Key Default Description
Track Product Views trackProductViews On ViewContent on product detail pages
Track Categories trackCategories On ViewCategory (custom event) on category pages
Track Add to Cart trackAddToCart On AddToCart on the cart page
Track Checkout trackInitiateCheckout On InitiateCheckout on the checkout confirmation page
Track Orders trackOrders On Purchase on the order finish page
Track Gross Prices trackGrossPrices On Use prices including VAT. Switch off for B2B shops to transmit net prices instead.

PageView has no switch of its own and always fires as soon as tracking is enabled and the Pixel ID is valid. What each event transmits is described on the Events and data page.

Conversions API (Server-Side)

Setting Key Default Description
Enable Conversions API capiEnabled Off Additionally send events server-side to Meta
Access Token capiAccessToken empty Conversions API token from Meta Events Manager. The field is a password field.
Test Event Code (optional) capiTestEventCode empty Test code from Meta Events Manager. While it is set, events appear in the Test Events tab. Clear it for production.
Server-Side Events capiEventSelection none selected Multi-select from PageView, ViewContent, ViewCategory, AddToCart, InitiateCheckout and Purchase. Only selected events are sent server-side.

If the selection is empty, the Conversions API sends nothing, even when it is enabled. Meta recommends at least PageView and Purchase.

The Conversions API only works when Enable Tracking is also on, the Pixel ID is valid and an access token is entered. All details are on the Conversions API page.

Test the connection

Below the Test Event Code you find the block Test API connection with the button Test connection. It sends a PageView test event to the Conversions API and thereby validates the Pixel ID and access token.

The result appears as a banner below the button. The banner title is Connection successful on success, otherwise Connection failed. Below it is the text from the table:

Result Text in the banner
Success (HTTP 200) Meta accepted the test event. Pixel ID and access token are valid.
No Pixel ID Please enter and save a Pixel ID first.
No access token Please enter and save an access token first.
Pixel ID with characters other than digits The Pixel ID must contain digits only.
Meta answers with a status other than 200 and returns an error message Meta rejected the request (HTTP {status}, code {code}): {message}. Status, code and message come from Meta.
Meta answers with a status other than 200 and returns no error message Meta rejected the request. Please verify your Pixel ID and access token in Meta Events Manager.
Request failed technically (for example timeout or firewall) Could not reach graph.facebook.com. Please check your server's internet connection and firewall.
Setting Key Default Description
Use Klaro Consent Manager useKlaroConsent Off Pixel scripts are rendered blocked for Klaro and only run after consent. Requires the MmdKlaroConsent plugin.
Klaro Service Name klaroServiceName facebook-pixel Technical name of the Klaro service. Must match the service in MmdKlaroConsent.

Details and the interplay with the other settings are on the Consent and cookies page.

Practical examples

B2C shop with Klaro and Conversions API

Setting Value
Pixel ID your numeric Pixel ID
Enable Tracking On
Use Klaro Consent Manager On
Klaro Service Name facebook-pixel
Track Gross Prices On
Enable Conversions API On
Access Token token from Events Manager
Server-Side Events PageView, ViewContent, AddToCart, InitiateCheckout, Purchase
Setting Value
Enable Tracking On
Require Cookie Consent On
Track Gross Prices Off

Your consent solution then has to set one of the recognised cookies (for example fb_consent with the value 1).

Test the Conversions API

  1. Enter the Test Event Code from Events Manager and save
  2. Verify the credentials with Test connection
  3. Visit the shop and watch the events in the Test Events tab of Events Manager
  4. Clear the Test Event Code again