Skip to Content

What is event ID in Facebook Pixel?

What is event ID in Facebook Pixel?

The Facebook pixel is a piece of code that website owners place on their site to track user activity and report it back to Facebook. The pixel allows you to measure and optimize your ads by understanding the actions people take on your website. One of the key components of the Facebook pixel is the event ID.

What are Facebook Pixel Events?

Facebook pixel events are actions that happen on your website that you want to track. This could be someone viewing a page, adding an item to their cart, completing a purchase, or any other interaction. When these events occur, the Facebook pixel triggers and sends data back to Facebook so you can analyze and attribute your conversions.

Some common event types include:

  • PageView – Someone views a page on your site
  • ViewContent – Someone views a product or content piece
  • AddToCart – Someone adds an item to their cart
  • InitiateCheckout – Someone begins the checkout process
  • AddPaymentInfo – Someone enters their payment information
  • Purchase – Someone completes a purchase
  • Lead – Someone fills out a lead form

You can create custom events as well to track specific actions unique to your business.

Why Do You Need an Event ID?

The event ID is a unique identifier that corresponds to each type of event you want to track with the Facebook pixel. The ID allows Facebook to understand exactly what event took place on your site.

For example, when someone views a product page, the Facebook pixel triggers and sends an event called ViewContent along with the specific event ID to Facebook. This allows Facebook to attribute that specific action to your ads and optimize your campaigns accordingly.

Without an event ID, Facebook would just receive generic pixel fires without any context around what actions those visitors took.

Where Do You Get the Event ID?

You can find Facebook pixel event IDs within Facebook ads manager. Here’s how to locate them:

  1. Go to the Events Manager in Facebook Ads Manager
  2. Click the “+ Create Event” button
  3. Select the type of event you want to create
  4. Facebook will generate a unique event ID for that type of event

For example, if you create an AddToCart event, Facebook will generate a unique ID number specifically for that event.

Standard Event IDs

Facebook provides standard event IDs for their default event types that you can use:

Event Event ID
PageView fbp
ViewContent fbc
AddToCart fbatc
InitiateCheckout fbidc
AddPaymentInfo fbapa
Purchase fbpu
Lead fblead

So for example, if someone views a product page, you would trigger the ViewContent event with ID fbc.

Custom Event IDs

If you create a custom event in Events Manager that doesn’t match Facebook’s standard events, a unique ID will be generated just for that custom event.

For example, you may want to track when someone watches a video on your site. You would create a custom “WatchVideo” event, and Facebook would generate a random ID like 1632547732974.

You would then trigger that specific event ID whenever someone watches a video to track it properly in Facebook.

How Do You Implement the Event ID?

To implement Facebook pixel events on your website, you’ll need to add additional JavaScript code to the base pixel code. This code will trigger the specific event and pass the proper ID.

It will look something like this:

fbq('init', 'YOUR_PIXEL_ID'); 

fbq('track', 'ViewContent', {
  content_ids: ['product1234'], 
  content_type: 'product' 
});

In this example, we are triggering the ViewContent event with ID fbc and passing additional parameters like the product ID.

The event trigger code needs to be placed wherever the action occurs on your site. For example, the ViewContent code should go on product pages.

You can learn more about implementing events in the Facebook Pixel developer docs.

Why Are Event IDs Important?

Event IDs are crucial for properly setting up and tracking events with the Facebook pixel. Here are some of the key reasons they matter:

  • Allow you to track specific user actions on your website beyond just page visits
  • Enable accurate measurement and attribution of your marketing campaigns and ads
  • Help Facebook optimize your ad delivery and targeting to users who are more likely to convert
  • Provide the ability to create customized remarketing audiences based on site engagement and behavior
  • Let you identify bottlenecks or problem areas in your customer journey/funnel
  • Give insight into your best-performing content, products, and channels

Troubleshooting Event IDs

Event Shows in Ads Manager But Not Analytics

If you are triggering events properly but not seeing data in Facebook Analytics, there are a few things to check:

  • Wait up to 24 hours for data to process in Analytics – sometimes there is a delay
  • Make sure the pixel ID on your site matches the one connected to Analytics
  • Confirm the event source in Analytics is set to Pixel and not API
  • Try hard refreshing your browser to clear any cached files
  • Reach out to Facebook support if issue persists

No Events Showing Up in Ads Manager

Potential reasons events are not appearing in Facebook Ads Manager after implementation:

  • Pixel code is not deployed properly – test it and confirm firing
  • Using an incorrect or outdated event ID
  • Pixel is not linked properly to the Facebook ad account
  • The action/event is not being triggered on site for some reason
  • Need to wait up to 48 hours for new event data to appear

Event Values Are Incorrect

If you are passing event parameters but they are showing up incorrectly in Facebook, make sure to double check:

  • Dynamic parameters are mapped properly in code to data layer
  • Parameters are being passed in the right syntax – ex: content_ids vs content_id
  • You are not passing duplicate values in multiple parameters
  • Data types match expected values (string vs integer etc)

Wrapping Up

Understanding event IDs is essential to properly setting up and optimizing the Facebook pixel. By taking the time to correctly configure and troubleshoot your events, you’ll be able to gain accurate insight into your customers’ journey and make the most of your Facebook ads.

As a quick recap, here are some key takeaways:

  • Event IDs identify the specific type of event you want to track
  • You can find standard event IDs in Facebook Ads Manager
  • Custom events will generate a unique random ID
  • Event code needs to be implemented on site to trigger tracking
  • Parameters can be passed with events to add additional data
  • Proper setup is crucial for accurate analytics and attribution

With this foundation on event IDs, you have the knowledge to implement events effectively and make the most out of the Facebook pixel.