v1.x.x Facebook Pixel (MndFacebookPixel) -EN

First public version of the documentation for version 1.0.0
Update documentation for version 1.0.2
  • new feature: Subshop capability

Update documentation for version 1.0.3

  • new feature: article ID configuration

Update documentation for version 1.0.4+

  • new feature: configurable link to privacy statement
  • added more detailed information about Facebook Pixel events

In version 1.0.4 we've removed the currency configuration. The currency is now selected from the active Subshop
26.01.2017Example Facebook item export added

Update documentation for version 1.0.10

  • english translation

Update documentation for version 1.0.11

  • New tracking events added: AddToWishlist and Lead
  • form ID configuration for Lead tracking

Update documentation for version 1.0.13

  • opt-in and opt-out functionality

Update documentation for version 1.1.0

  • tax configuration
  • shipping costs configuration
  • advanced matching integration


The MND Facebook Pixel plugin integrates Facebook's tracking feature into Shopware. Predefined events are triggered in the Shopware storefront and submitted to Facebook.

Statement "facebook for business"

"The Facebook pixel is a piece of code that you can place on your website to report conversions, build audiences and get rich insights about how people are using your website."

More information on Facebook: https://www.facebook.com/business/help/651294705016616
Please make sure to check your privacy statement for legal compliancy and if the usage of this plugin i.e. Facebook Pixel is legal in your country.

Features of the plugin

The plugin adds the Facebook Pixel tracking code to your shop. The plugin can be configured, activated and deactivated for each Subshop.

The following events will be tracked:

DescriptionFB-Pixel-EventRelevant Shopware Events / ActionsParameter
Search and Ajax-SearchSearch

controller: search

method: defaultSearch

search_string: Entered search text
content_category: 'Product Search'
Content viewViewContent

controller: detail

method: index

content_name: Article name
content_category: Name of Category (no Category path)
content_ids: article-ID or ordernumber (see plugin configuration)
content_type: 'product'
value: Article price
currency: ISO currency code of current store
Add to cartAddToCartClick on Buy-Button
content_name: Article name
content_ids: article-ID or ordernumber (see plugin configuration)
content_type: 'product'
value: Article price
currency: ISO currency code of current store
Customer signed upCompleteRegistration
when completed registration

controller: account

value: Basket value excl. shipping
currency: ISO currency code of current store
content_name: 'Registration'
status: 'complete'
Customer initiates checkout

controller: checkout

method: confirm

value: Basket value
currency: ISO currency code of current store
content_name: 'Checkout',
content_ids: article-ID or ordernumber (see plugin configuration)
content_type: 'product' oder 'product_group'
num_items: Number of items in basket

controller: checkout

method: finish

Only one item was ordered:
content_name: Article name
content_category: Category name of the article
content_ids: article-ID or ordernumber (see plugin configuration)
content_type: 'product',
value: Order value
currency: ISO currency code of current store 
Multiple items ordered:
content_ids: Article-ID or Order-ID (see plugin configuration)
content_type: 'product',
value: Basket value
currency: ISO currency code of current store
Customer adds article to wishlistAddToWishlist

controller: newsletter

method: finish

value: Basket value,
currency: ISO currency code of current store,
content_name: Article name,
content_ids: Article-ID or Order-ID (see plugin configuration),
content_type: 'product'

Customer registers for newsletter or sends a contact form (contact form or inquiry form by default)Lead

controller: newsletter

method: index

controller: forms

method: index

Newsletter registration:

content_name: 'Newsletter registration'

Contact form submit:

content_name: 'Contact form submitted'
For more information about the specific events please see: https://www.facebook.com/business/help/402791146561655

You can customize all event values via the shopware templateing system

Installation and Usage

Install the plugin using the Shopware Plugin Manager.

After the installation you should clear the Shopware Caches (Frontend and HTTP-Proxy).

Further information about the installation process in Shopware:

Plugin-Installation: http://en.community.shopware.com/_detail_1638.html?_ga=1.157404536.358724997.1486735614
Plugin-Manager: http://en.community.shopware.com/_detail_1858.html?_ga=1.157404536.358724997.1486735614


Make sure the currency codes in the currency settings of your shopware installation comply to ISO 4217.

You can configure if the plugin should be activated for each Subshop.

Enter your Facebook Pixel-ID.

Select which identifier should be used for the articles.

  • internal article-ID of Shopware
  • the official ordernumber

You can change the form IDs (contact form and inquiry form by default) to activate/deactivate the lead tracking for specific forms.
If you want to provide opt-in or opt-out you need to specify the desired functionality. Change the respective configuration options if you want to submit values with tax included and/or shipping costs.

The identifer must match the uploaded articles in your facebook catalogue.

Facebook Statistics

Opt-in or opt-out


Pixel Tracking is disabled and the user needs to opt-in by clicking the opt-in link (see below).


Pixel Tracking is active and the user has the option to disable the tracking by clicking the opt-out link.

In both cases a cookie consisting of the shops hostname and the suffix "-pixel-opt-in" or "-pixel-opt-out" is set. The cookie lifetime is set to 100 years.

Please use the following links to integrate the respective functionality:


<a href="javascript:mndCookie.mndSetPixelOptIn();" onclick="alert('Facebook Pixel tracking enabled.');">Enable Facebook Pixel tracking</a>


<a href="javascript:mndCookie.mndSetPixelOptOut();" onclick="alert('Facebook Pixel tracking disabled.');">Disable Facebook Pixel tracking</a>

Advanced Matching

Advanced matching improves the identification of your customers by submitting additional data like name, e-mail or phone numbers to Facebook.
Please see the Facebook documentaction for more information about the functionality and submitted data.

Item export

To export your items to the Facebook product catalogue you'll need an export template. You can use the following template to get you started.




{$sArticle.name|strip_tags|strip|trim|truncate:150:"...":true|escape|regex_replace:"#[^\w\.%&\-+ \|]#iu":""|replace:";":","}{#S#}
{$sArticle.description_long|strip_tags|strip|trim|truncate:150:"...":true|escape|regex_replace:"#[^\w\.%&\-+ \|]#iu":""|replace:";":","}{#S#}
"{if $sArticle.instock>0}in stock
{elseif $sArticle.releasedate && $sArticle.releasedate|strtotime > $smarty.now}preorder
{elseif $sArticle.shippingtime}in stock
{else}out of stock{/if}"


The Plugin is also uninstalled using the Plugin manager.