Skip to main content

Meta (Facebook) Pixel Settings

This document explains how to configure Meta Pixel tracking via GTM.

Container File

Download the Meta Pixel container file and import it into GTM:

Download Meta Pixel Container

Container Import

Follow the steps on the Analytics & Tagging page to import the container.

1. Getting Your Meta Pixel ID

Step 1: Sign in to Meta Events Manager

Go to business.facebook.com/events_manager.

Step 2: Find the Pixel ID

  1. Click Data Sources in the left menu
  2. Select your Pixel
  3. Go to the Settings tab
  4. Copy the Pixel ID value

Meta Pixel ID

Pixel ID Format

The Pixel ID consists of numbers only. Example: 708154956804907

2. Updating the Meta Pixel ID in GTM

Step 1: Navigate to Variables

  1. Click Variables in the left menu
  2. Under User-Defined Variables, click Meta Pixel ID

GTM Variables - Meta Pixel ID

Step 2: Update the Pixel ID

  1. Replace the XXXXXXXXXXXXXXXXX value in the Value field with your own Pixel ID
  2. Click Save

Meta Pixel ID Edit

3. Testing

GTM Preview Mode

  1. Click Preview in GTM
  2. Open your site and perform test actions
  3. Check that Meta Pixel tags are firing in the GTM Debug panel

Meta Pixel Helper (Chrome Extension)

  1. Install the Meta Pixel Helper extension
  2. Visit your site
  3. Click the extension icon to verify events are being sent correctly

Meta Events Manager

  1. Go to Events Manager > Select your Pixel
  2. Go to the Test Events tab
  3. Enter your site URL and run tests
  4. Confirm that events are coming through

4. Publishing

After a successful test:

  1. Click Submit in GTM
  2. Enter a version name (e.g. "Meta Pixel Setup")
  3. Click Publish

Tracked Events

GTM EventMeta Pixel EventDescription
page_viewPageViewPage view (automatic)
view_itemViewContentProduct detail view
view_item_listViewContentCategory/list view
add_to_cartAddToCartAdd to cart
begin_checkoutInitiateCheckoutBegin checkout
add_payment_infoAddPaymentInfoAdd payment info
purchasePurchasePurchase
searchSearchSearch
sign_upCompleteRegistrationRegistration complete
generate_leadLeadLead generation
add_to_wishlistAddToWishlistAdd to wishlist

Sent Parameters

Purchase Event Example

fbq('track', 'Purchase', {
content_ids: ['SKU123', 'SKU456'],
content_type: 'product',
contents: [
{id: 'SKU123', quantity: 2, item_price: 99.90},
{id: 'SKU456', quantity: 1, item_price: 149.90}
],
num_items: 3,
value: 349.70,
currency: 'TRY',
order_id: '1001234'
});

Using with Facebook CAPI

Facebook Conversions API (CAPI) is already running on the backend. When Meta Pixel (client-side) and CAPI (server-side) are used together:

  • Event Deduplication: event_id is used to prevent the same event from being counted twice
  • Better Matching: Browser and server data are combined for more accurate attribution
  • iOS 14+ Compliance: CAPI helps bypass iOS tracking restrictions
Recommended Setup

Both Pixel and CAPI should be active. The system automatically handles event deduplication.

Troubleshooting

Pixel Helper "No Pixel Found" error

  • Make sure the Pixel ID was entered correctly
  • Make sure GTM has been published
  • Refresh the page

Events showing as duplicates

  • Tag Firing Option should be set to "Once per event"
  • Make sure the same event_id is used for both CAPI and Pixel

"Pixel did not load" error

  • Make sure ad blockers are disabled
  • Check for JavaScript errors in the browser console

Values appear incorrect

  • Check in GTM Preview that the ecommerce.value and ecommerce.currency variables are working correctly
  • Verify that correct data is being sent in the dataLayer