Use this guide to update and install the Meta Pixel (previously Facebook Pixel).

Visitors on a Kartra page or other hosted asset are required to consent to cookies in order to dismiss an alert banner at the bottom of the screen. A toggle allows them to choose between all cookies or mandatory cookies only.

To use the Meta Pixel to track activity across Kartra Pages in a GDPR-compliant manner, an extra line of code must be added to the pixel tracking code in order to implement a visitor’s cookie consent correctly.

This is true whether you install the pixel on your Kartra page directly or via Google Tag Manager.


The Meta Pixel cannot recognize a page visitor’s cookie consent without the extra line of code. If the extra line is not added to the default pixel code, activity on Kartra pages may be tracked by the pixel without the visitor’s consent.

To get and modify your Meta Pixel code:

  • Go to your Meta Events Manager and follow the instructions to create a new pixel
  • In the pixel setup, choose Manually add pixel code to website
  • Copy the code and paste it into a text editor where you can change it
  • Look for the line containing your pixel ID: fbq('init', '{your-pixel-id-goes-here}');
  • Add a new line immediately above it, and paste fbq('consent', 'revoke');

Example of the updated code

Meta Facebook pixel code example

Note: Do NOT add this code example to your page. Log in to your Meta Events Manager account and copy the code from there. This will ensure that the code you use is the most up-to-date version and contains your unique pixel ID.

To install the pixel code in Kartra pages:

  • Copy the modified pixel code
  • Open a page in your Kartra account
  • Click Settings and Tracking Code in the side menu
    Add tracking code in the settings menu
  • Paste the modified pixel code in the Embed Facebook ADS Tracking Code field
    The pixel code goes in the Facebook Ads tracking code field
  • Apply to save settings
  • Publish the page so Meta can detect the tracking code


It may take a few hours for verification to show up on Meta after publishing a page with the pixel code. To verify that your pixel is working in Kartra, download the Meta Pixel Helper.

With the modified pixel installed, Meta will recognize the page visitor’s cookie consent:

  1. If users Accept all cookies, the Meta Pixel will also be accepted.
  2. If users Accept only mandatory cookies, the Meta Pixel will not receive permission to track.