Standard events best practices

30/11/2019

Events are actions that happen on your website, either as a result of Facebook ads (paid) or organic reach (unpaid). Standard events within the Facebook pixel code enable you to track specific events, optimise for conversions and build audiences.

Simply copy the code for the type of event you want to track and add it to the pixel base code on the relevant page of your website. Learn how to install the Facebook pixel.

Below are important tips and best practices for using standard events:

  • Standard event codes are case sensitive, so make sure that you copy the code snippet exactly as it appears. For example, the standard event code for tracking page views is fbq('track', 'ViewContent'); as shown in the table below. If you accidentally add fbq('track', 'viewcontent'); to one of your web pages instead, an event called viewcontent will be shown in your ads reporting as a custom event rather than a standard event. Learn about the difference between standard and custom events.
  • For the standard event "Purchase," we recommend setting the value and currency to better reflect your conversion. Learn about setting the value and currency of your conversions.
  • Add a full funnel of events (e.g. ViewContent, AddToCart and Purchase) to capture all relevant purchase actions. For example, if you sell toys on your website, you would place the corresponding standard event code on your add-to-basket page and purchase page.

Standard events

Website actionDescriptionStandard event code
Add to basket Track when items are added to a shopping basket (e.g. click, landing page on Add to Basket button).fbq('track', 'AddToCart');
Add payment infoTrack when payment information is added in the checkout flow (e.g. click, landing page on billing info)fbq('track', 'AddPaymentInfo');
Add to wishlist Track when items are added to a wishlist (e.g. click, landing page on Add to Wishlist button).fbq('track', 'AddToWishlist');
Complete registration Track when a registration form is completed (e.g. subscription completion, sign-up for a service).fbq('track', 'CompleteRegistration');
Contact A telephone/SMS, email, chat or other type of contact between a customer and your businessfbq('track', 'Contact');
Customise product The customisation of products through a configuration tool or other application that your business ownsfbq('track', 'CustomiseProduct');
Donate Track donation of funds to your organisation or causefbq('track', 'Donate');
Find location Track when a person finds one of your locations on the Internet or application with the intention to visitfbq('track', 'FindLocation');
Initiate checkout Track when people enter the checkout flow (e.g. click, landing page on checkout button).fbq('track', 'InitiateCheckout');
Lead Track when someone expresses interest in your offering (e.g. form submission, sign-up for trial, landing on pricing page).fbq('track', 'Lead');
Purchase Track purchases or checkout flow completions (e.g. Landing on "Thank you" or confirmation page).fbq('track', 'Purchase', {value: '0.00', currency: 'GBP'});
Schedule Track the booking of an appointment to visit one of your locationsfbq('track', 'Schedule');
SearchTrack searches on your website, app or other property (e.g. product searches)fbq('track', 'Search');
Start trial Track the start of a free trial of a product or service that you offer (e.g. trial subscription)fbq('track', 'StartTrial', {value: '0.00', currency: 'USD', predicted_ltv: '0.00'});
Submit application Track when a registration form is completed for a product, service or programme that you offer (e.g. credit card, educational programme or job)fbq('track', 'SubmitApplication');
Subscribe Track the start of a paid subscription for a product or service that you offerfbq('track', 'Subscribe', {value: '0.00', currency: 'USD', predicted_ltv: '0.00'});
View content Track key page views (e.g. product page, landing page, article). fbq('track', 'ViewContent');

Standard event example

See below for an example of what your website code will look like with standard events installed.

  1. Your website's original code: Paste the Facebook pixel code between the and tags of your web page. You may already have other existing code between the head tags. If so, just place the pixel code underneath that, but above .
  2. Your Facebook pixel base code: Your Facebook pixel code will look like the diagram above, except your pixel ID will be different to 1234567890.
  3. Your standard event code: Within your Facebook pixel code, above the tag, paste the standard event code that's relevant to your page, such as the AddToBasket code. You'll need to do this for every page that you want to track.
  4. The key here is that every page of your website should have everything that's enclosed in section 2 (the base code), but different pages will have different snippets of code for section 3 (standard event code). See below for another example.

* Nguồn: Facebook