v1.x.x Facebook Pixel (MndFacebookPixel) -EN
URL to Shopware Store | https://store.shopware.com/en/mnd5298432986837/facebook-pixel-for-shopware.html |
---|---|
Shopware compatibility | 5.0.0 + |
Date | Change |
---|---|
21.06.2016 | First public version of the documentation for version 1.0.0 |
25.07.2016 | Update documentation for version 1.0.2
|
08.08.2016 | Update documentation for version 1.0.3
|
15.08.2016 | Update documentation for version 1.0.4+
In version 1.0.4 we've removed the currency configuration. The currency is now selected from the active Subshop |
26.01.2017 | Example Facebook item export added |
06.03.2017 | Update documentation for version 1.0.10
|
31.05.2017 | Update documentation for version 1.0.11
|
14.11.2017 | Update documentation for version 1.0.13
|
23.01.2018 | Update documentation for version 1.1.0
|
Description
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
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:
Description | FB-Pixel-Event | Relevant Shopware Events / Actions | Parameter |
---|---|---|---|
Search and Ajax-Search | Search | controller: search method: defaultSearch | search_string: Entered search text content_category: 'Product Search' |
Content view | ViewContent | 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 cart | AddToCart | Click 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 up | CompleteRegistration | 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 | InitiateCheckout | 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 |
Purchase | Purchase | 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 wishlist | AddToWishlist | 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
Plugin-Configuration
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
Opt-in
Pixel Tracking is disabled and the user needs to opt-in by clicking the opt-in link (see below).
Opt-out
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:
Opt-in:
<a href="javascript:mndCookie.mndSetPixelOptIn();" onclick="alert('Facebook Pixel tracking enabled.');">Enable Facebook Pixel tracking</a>
Opt-out:
<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.
More information about the Shopware item export can be found at: http://en.community.shopware.com/_detail_828.html?_ga=1.60916334.358724997.1486735614#Introduction
Header
{strip} id{#S#} title{#S#} description{#S#} image_link{#S#} link{#S#} gtin{#S#} mpn{#S#} brand{#S#} condition{#S#} product_type{#S#} price{#S#} shipping{#S#} google_product_category{#S#} availability {/strip}{#L#}
Body
{strip} {$sArticle.ordernumber|escape}{#S#} {$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#} {$sArticle.image|image}{#S#} {$sArticle.articleID|link:$sArticle.name|escape}{#S#}{$sArticle.ean|escape}{#S#} {$sArticle.suppliernumber|escape}{#S#} {$sArticle.supplier|replace:"|":""}{#S#} new{#S#} {$sArticle.articleID|category:">"|escape|replace:"|":""}{#S#} {$sArticle.price|escape:"number"}{#S#} DE::DHL:{$sArticle|@shippingcost:"prepayment":"de"}{#S#} {$sArticle.articleID|category|escape}{#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}" {/strip}{#L#}
Uninstall
The Plugin is also uninstalled using the Plugin manager.