What are the Facebook Pixel Default Events

Set up Facebook Pixel

Creation of the Facebook pixel

To create a Facebook pixel for your own website, you first need your ownFacebook Business Manager. In this afterwards, for example Advertising accounts and advertisements are placed. The instructions for creating it are very simple:

  1. Go to business.facebook.com
  2. Click Create Account
  3. Enter a name for your company and the required information (note: you will need a Facebook page, which you can create here if no page already exists)

In your Business Manager account you can then, as shown in the following picture, to pixel Navigate the page that explains how the pixel was created.

To set up, select 'Set up pixels' and subsequently 'Carry out the manual installation of the pixel code yourself '. Then the code displayed there must be in Header Area of ​​your website.

Implementation of the Facebook pixel

The Facebook Pixel Code should be on each subpage Your website can be built in and also with the appropriate Standard eventsbe provided. Standard events are events such as "purchase", "complete registration", "add to shopping cart", "view products", etc.

Basically, the code looks like this without standard events:

<!-- Facebook Pixel Code -->
! function (f, b, e, v, n, t, s)

n.callMethod.apply (n, arguments): n.queue.push (arguments)};
if (! f._fbq) f._fbq = n; n.push = n; n.loaded =! 0; n.version = '2.0';
n.queue = []; t = b.createElement (e); t.async =! 0;
t.src = v; s = b.getElementsByTagName (e) [0];
s.parentNode.insertBefore (t, s)} (window, document, 'script',
fbq ('init', '[PIXEL_ID]');
fbq ('track', 'PageView');

<!-- End Facebook Pixel Code -->

The one marked in red Pixel ID is in the ad manager under the Pixel settings visible. Our customers receive the Pixel ID directly from us.


Standard events

With the help of Standard events you can track your individual goals. For example, you can use it to track how many people viewed or even bought a particular product after clicking on your ad, and how much sales you generated with it.

You can also set different standard events on different sub-pages and thus track different activities.

Depending on the default event you want, just add the commands below additionally go to fbq ('track', 'PageView'); a.

  • Product Pages and Landing Pages:fbq ('track', 'ViewContent');
  • Search:fbq ('track', 'Search');
  • Add to cart:fbq ('track', 'AddToCart');
  • Complete purchase (Is used for conversion tracking on the order completion page. Optionally, JSON object parameters can be added, for example to record the value). Example: fbq ('track', 'Purchase', {currency: "USD", value: 30.00});
  • Further events can be found in the specifications for standard events.

For Facebook remarketing via Dynamic Product Ads The following standard events are a minimum requirement:

  • 'ViewContent' includedcontent_ids and content_type
  • 'AddToCart' includedcontent_ids and content_type
  • 'Purchase' includedcontent_ids, content_type, value and currency

Facebook pixel examples

Below you will find additional event codes for some standard events such as adding a product to the shopping cart. In addition to the Facebook pixel code, these codes must be inserted in the at the beginning of the tag.

Facebook pixel for product pages

Page visits from certain detail pages can be tracked and analyzed using the code attached below. It is sufficient if these are only implemented on certain pages. E.g. particularly important product pages.

fbq ('track', 'ViewContent');


Facebook pixel for "add to cart"

Note: If your shopping cart is redirected to a new page, the code should be stored on this page. The event can also take place on a Button be placed. You can find detailed instructions on how to do this in the Facebook Developer Guide.

fbq ('track', 'AddToCart', {
currency: '[CURRENCY]',
contents: [
id: '[PRODUCT_ID]',


Facebook pixel for purchase completion pages

This code must be on the Purchase completion page or Order confirmation page implemented.

fbq ('track', 'Purchase', {
value: [SALES_VALUE],
currency: '[CURRENCY]',
contents: [
id: '[PRODUCT_ID]',

Google Tag Manager

If you work with the Google Tag Manager, you can simply send the above code viaCustom HTML tag build in. You may have to use variables for the events. In our Google Tag Manager Guide you will find all the information you need to implement the Pixel in this way.

Why Google does not offer an official Tag Manager template for the Facebook Pixel is a mystery to us (since both companies offer various tools of equal value that compete with each other, the reason is relatively easy to guess). Since 2019, however, it has been possible to create your own Tag Manager templates and share these templates with each other. Simo Ahava has created a great template for the Facebook Pixel, which can be downloaded from Google's official template gallery. We recommend this template because it also supports several Facebook Pixel IDs by default.

Were we able to help you with this article or do you have any questions? Then just leave us a comment and we will be happy to help you as soon as possible.

Additional information

You can find more detailed information on installation in the developer documentation on Facebook: