Facebook Pixel for Shopware 6

Table of contents

Highlights for the Meta Pixel

  • Easy Facebook Pixel integration via GTM: Quick and uncomplicated implementation of the Facebook Pixel with the Google Tag Manager. Use the flexibility of GTM for efficient tracking.
  • Comprehensive DataLayer tracking for Facebook: Capture detailed information about user behavior with specific Facebook Pixel events (e.g. AddToCart, Purchase, ViewContent) for precise analytics.
  • Enhanced Matching: Improve the matching of website visitors to Facebook users by submitting securely hashed customer data (email, phone number) to increase the effectiveness of your ads.
  • Data protection compliance: Integrated support for consent management solutions (such as the standard Shopware data protection plugin, Cookiebot, Usercentrics, etc.) to ensure compliance with data protection regulations.
  • Manufacturer and category tracking: Analyze sales by manufacturer and category (up to 5 levels) to gain insights into the performance of individual product groups.
  • Product search tracking: Track search queries to identify popular products and optimize the search function.
  • Payment info tracking: Analyze the use of different payment methods to optimize your payment offer.
  • Product add-to-cart tracking: Identify products that are frequently added to the shopping cart but not purchased in order to improve the purchasing process.
  • User ID tracking option: Track user behavior across different devices and sessions to get a comprehensive picture of the customer journey.
  • Product click tracking: Measure the effectiveness of internal linking by tracking product clicks on different pages (category pages, search page, cross-selling elements).

Meta Pixel Events

ViewContent Event

The Facebook Pixel ViewContent event is triggered when a user views a specific page on your website that you consider important – often a product page, a landing page or a central article. It helps you understand which content or products are of interest and forms the basis for retargeting campaigns based on the content viewed.

				
					 "meta_object": {
    "meta_event": "ViewContent",
    "meta_object_data": {
      "contents": [
        {
          "id": "SWDEMO10002"
        }
      ],
      "content_type": "product",
      "content_name": "Variantenprodukt-TEST",
      "content_category": "Katalog #1>Freizeit & Elektro"
    }
  }
				
			

AddToCart Event

The Facebook Pixel AddToCart event is triggered when a user adds a product to their shopping cart. It helps you to measure interest in certain products and create retargeting campaigns for users who have added items to their shopping cart but have not yet completed the purchase.

				
					 "meta_object": {
    "meta_event": "AddToCart",
    "meta_object_data": {
      "contents": [
        {
          "id": "SWDEMO10002"
        }
      ],
      "content_type": "product",
      "content_name": "Variantenprodukt-TEST",
      "content_category": "Katalog #1>Freizeit & Elektro"
    }
  },
				
			

AddToWishlist Event

The Facebook Pixel AddToWishlist event is triggered when a user adds a product to a wishlist on your website. This event helps you to track interest in products that users bookmark for later purchase and enables targeted advertising to encourage these users to return and make a purchase.

				
					"meta_object": {
    "meta_event": "AddToWishlist",
    "meta_object_data": {
      "contents": [
        {
          "id": "SWDEMO10001"
        }
      ],
      "content_type": "product",
      "content_name": "Hauptartikel",
      "content_category": "Katalog #1>Freizeit & Elektro"
    }
  }
				
			

CompleteRegistration Event

The Facebook Pixel CompleteRegistration event is triggered when a user completes a registration process on your website. This could be signing up for a newsletter, creating a user account or submitting a lead form. This event helps you to measure conversion rates for registrations and identify newly registered users.

				
					"meta_object": {
    "meta_event": "CompleteRegistration",
  }
				
			

Lead Event

The Facebook Pixel lead event is triggered when a user expresses interest in your offer and identifies themselves as a potential customer (lead). This typically happens by filling out a form, requesting a quote or subscribing to a newsletter in exchange for contact details. This event helps you track the generation of leads on your website and measure the effectiveness of your customer acquisition marketing efforts.

				
					"meta_object": {
    "meta_event": "Lead",
  }
				
			

InitiateCheckout Event

The Facebook Pixel InitiateCheckout event is triggered when a user begins the checkout process on your website. This typically happens after items are added to the shopping cart and the user clicks a button such as “Checkout” or “Start checkout”. This event helps you track how many users initiate the checkout process and is an important step in the sales funnel.

				
					"meta_object": {
    "meta_event": "InitiateCheckout",
    "meta_object_data": {
      "contents": [
        [
          {
            "id": "SWDEMO10001cx56160",
            "quantity": 1
          },
          {
            "id": "SWDEMO10001",
            "quantity": 1
          }
        ]
      ],
      "content_type": "product",
      "num_items": 2
    }
  },
				
			

Purchase Event

The Facebook Pixel Purchase event is triggered when a user completes a purchase on your website. This is typically when the user reaches the checkout page after the payment has been successfully processed. This event is one of the most important for e-commerce companies as it measures direct sales and helps to calculate the return on investment (ROI) of advertising campaigns.

Advanced Matching significantly improves the accuracy of this event. In addition to the pixel event, hashed customer data (such as email address, phone number, name, address) is securely transmitted to Facebook. This enables Facebook to match website visitors with Facebook users more reliably, even when users interact across different devices. Advanced Matching in the purchase event gives you more accurate conversion data, better attribution of purchases to your ads and allows you to create more effective audiences for retargeting and lookalike audiences.

				
					"meta_object": {
    "meta_event": "Purchase",
    "meta_object_data": {
      "value": 833.52,
      "currency": "EUR",
      "contents": [
        {
          "id": "SWDEMO10001",
          "quantity": 1
        },
        {
          "id": "SWDEMO10001cx56160",
          "quantity": 1
        }
      ],
      "content_type": "product",
      "num_items": 2,
      "order_id": "10397"
    }
  },
  "email": "95f177271526a221eb449f34897ec8feb6a7fd03c00673cf971efa1b3c5825d4",
  "phone_number": "275cca81e285f4a39a06dd3d5d61663e2ffcbd1f845afb7e82babe4e42532d7f",
  "address": {
    "first_name": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "last_name": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "street": "test",
    "city": "test",
    "postal_code": "555",
    "country": "DE"
  },
				
			

Search Event

The Facebook Pixel Search event is triggered when a user uses the search function on your website. It records what visitors search for on your site.

This event is useful for understanding what products, services or information your users are actively searching for, which can provide insights for content strategies, product development or more targeted ads.

				
					"meta_event": "Search",
    "meta_object_data": {
      "contents": [
        [
          {
            "id": "SW10012x40144",
            "quantity": 1
          },
          {
            "id": "BA009x66",
            "quantity": 1
          }
        ]
      ],
      "content_type": "product",
      "search_string": "test"
    }
  },
				
			

ViewContent Event

The Facebook Pixel ViewContent event is triggered when a user views a specific content page on your website. This is typically a product page, a landing page or an important article.

This event helps you to understand what specific content or products your visitors are interested in. It is essential for retargeting users who have shown interest in certain articles but have not yet made a purchase and for analyzing the popularity of individual pages.

				
					"meta_object": {
    "meta_event": "ViewContent",
    "meta_object_data": {
      "contents": [
        {
          "id": "SWDEMO10005.6"
        }
      ],
      "content_type": "product",
      "content_name": "Hauptprodukt mit erweiterten Preisen-TEST2",
      "content_category": "Katalog #1>Freizeit & Elektro>Audio"
    }
  }