Add Meta pixel into your site
  • 11 Mar 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Add Meta pixel into your site

  • Dark
    Light
  • PDF

Article summary

ViewLift supports Facebook pixel tracking on your web and apps. If you want to enable Facebook pixel and Conversion API to work in apps and site, you have to enable them from AppCMS Settings. 

This article outlines how to configure Facebook pixel and Conversion API in ViewLift. 

Facebook pixel vs. the Conversions API 

According to Facebook, the pixel lets you share web events from a web browser, while the Conversions API lets you share web events directly from your server. In terms of using these tools, ViewLift recommends using both as that helps in better tracking of the events.

To enable pixel tracking and Conversion API tracking on your site and apps, you will need a:

  • Facebook Business Manager account (for your Facebook App ID)
  • Website for your business (no external code is required to integrate pixel. This is supported internally in the ViewLift code).

Facebook Conversion API 

Facebook recommends setting up the Conversion API for your Facebook marketing campaigns as a solution to beat the 7-day cookie expiration on browsers like Safari, site speed, and "data loss" due to ad blockers in browsers in the client-side conversion tracking.

What is Facebook Conversion API?

The Facebook conversions API is a server-side tool. It allows you to track conversions through your website's server instead of using your customer's browser. Instead of tracking “browser pixel events,” it tracks “server events." For more information, see Conversions API.

ViewLift has implemented a new API on your website's server to pass web events internally from your site/apps' frontend API to the tracking library on the backend server. The data points then flow from the backend server to Facebook's Conversion API.

Here is the list of events that you will start seeing after the integration. 

  • AddPaymentInfo - When payment information is added to the checkout flow.
  • AddToCart - When a subscription plan is added to the cart.
  • AddToWishlist
  • RemovedFromWatchlist
  • CompleteRegistration
  • SubscriptionInitiated
  • SubscriptionCompleted
  • SubscriptionFailed
  • InitiateCheckout
  • PageView
  • tvod_purchase
  • tvod_purchase_completion
  • Search
  • StartTrial - When a user starts a free trial of a plan.
  • ViewContent
  • Login
  • Logout
  • Play Started
  • Watched
  • App Download
  • App Uninstalls

Facebook offers a number of partner integrations such as pickaxe.ai that makes it easier to measure your Facebook marketing activities via the server-side Conversions API. For more information, see this Facebook article.

Add Facebook Conversion Keys in Tools CMS


1. Access Token 2. Your pixel ID 3. Test Access Token

 


Toggle on Facebook Conversion Keys API and copy the Access Token that you have generated from the Events Manager page of Business Manager. To learn how to get your access token, see this Facebook article.  

To get the pixel ID, go to Events Manager.
  1. Click the Data sources icon on the left-hand side of the Page.
  2. Select the pixel you want to set up. Facebook recommends that you use the same pixel ID for your browser and server events.
  3.  Click Save on the AppCMSSettings page once done. 

The Conversion API integration is complete. You will start seeing the events from the user devices across all your platforms in the Overview tab of your Business Manager account.

Test events

To test server events, go to the Test events tab, copy the test token under Test server events, paste this into the Test Token box in ViewLift, and click Save, To learn how to test your server events using the test events tool, see this Facebook help page.

Facebook pixel

ViewLift's web and apps code base has added support for pixel on all video and settings pages. To integrate your Facebook pixel with ViewLift CMS, go to AppCMS > Settings > Social Media. In the Facebook pixel ID field, enter the Facebook pixel ID, and the tracking will start

Don't have pixel yet? Follow the instructions in this Facebook article on how to create and install a Facebook pixel on your site and apps.

Pixel is now supported for both iOS and Android via the Facebook SDK. You can access this data via the Facebook Analytics dashboard, once logged in to your Facebook account.

Facebook pixel events for Web

ViewLift passes pixel events to your Facebook Events Manager account when any or all of the following user events are fired from your website: 

Event NameCodeAction that users need to complete to trigger as an event on your website
PageView
On every page load.
AddToCart{'isAddedCart': true}A user clicked on the Subscribe Now button and landed on the View Plans page or directly landed on View Plans page.
Purchase{'value': Amount, 'currency': CurrencyCode}Arrived on the Thank you page.
Initiate checkout {'checkout': true}Arrived on the Create Account page. 
Complete Registration{'isUserRegistered': true}Completed a sign-up process.
Add Payment Info{'payment': true}Submitted the payment information (Stripe form).

Was this article helpful?