- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
This article describes how to set up the Facebook Pixel tag in your Tealium iQ Tag Management account.
For information about the legacy Facebook Pixel, see Facebook Pixel Setup Guide (Legacy).
In this article:
true
and use the latest version of the Tealium Collect tag.num_items
value if a product quantity array is present.trackSingle
(true by default)disablePushState
(false by default)To support the Facebook Conversions API for Web, the tag generates a unique event ID for each event tracked and send it to Tealium EventStream for use in the Facebook Conversions connector. The event ID may be mapped in the connector to synchronize the web-based on server-based integrations. This feature requires an active Tealium Collect tag.
The tag emits new event attributes using the following naming convention:
fb_event_id_<Facebook Event>_<Tag UID>
For example: fb_event_id_Purchase_32 : "028b2ade7478..."
or fb_event_id_PageView_32
IDs were previously generated as fb_event_id_<Facebook Event>
. These IDs will continue to be generated but are considered legacy. The new IDs allow for use with multiple Facebook tags firing on a single page and offer a stronger tie back to the related tag. If you are using the legacy version, you must change the connector to the new ID.
See the Facebook Conversions Connector Setup Guide.
First, go to the Tealium Tag Marketplace and add the Facebook Pixel tag (Learn more about how to add a tag).
After adding the tag, configure the following settings:
fbq("init", "12345678901234");
fbq("init", "12345678901234", {em:"6dd8b7d7..."});
fb_event_id_<Facebook Event>
fb_event_id_Purchase : "028b2ade7478..."
Facebook Pixel events are configured through data mappings by selecting a variable that maps to an event and entering a trigger. The trigger initiates the event when the variable is equal to a specific value, as demonstrated in the following use case.
To set up a purchase event:
tealium_event
from the variable drop-down list and click Select a Destination.Purchase
, which is the value tealium_event
must equal to trigger a purchase.Purchase
, which is the event that is triggered when tealium_event
equals purchase.The following example passes the product brand with the purchase event:
product_brand
from the variable drop-down list and click Select a Destination.brand
for the Custom Parameter.Purchase
which the Custom Parameter collects with.Test the mappings by using the Facebook Pixel Helper or the Developer Tools offered by your browser.
purchase
, product_id
, and product_brand
.Data mappings follow a hierarchy in which specific mappings, such as Event-Specific Parameters, take precedence over more general mappings. For example, if you map a variable to the Currency destination in the Standard Tracking Parameters tab and to the Currency destination for the ViewContent event, the ViewContent mapping takes precedence over the general mapping, but only for the ViewContent event. For all other events, the Standard Tracking mapping is used.
Mapping is the process of sending data from a data layer variable to the corresponding destination variable of the vendor tag. For instructions on how to map a variable to a tag destination, see Data Mappings.
The available categories are:
Destination | Variable | Type | Description |
---|---|---|---|
Pixel ID | pixel_id |
[String] |
|
Toggle Automatic PageView | auto_page_view |
Boolean [true/false] |
|
Toggle Advanced Matching | advanced_matching |
Boolean [true/false] |
|
Generate Event IDs | generate_event_id |
Boolean [true/false] |
|
Automatically Calculate Number of Items | calc_items |
Boolean [true/false] |
|
Toggle trackSingle Usage | track_single |
Boolean [true/false] |
|
Toggle disablePushState Usage | disablePushState |
Boolean [true/false] |
|
Destination | Variable | Type | Description |
---|---|---|---|
am.em | [String] |
|
|
First Name | am.fn | [String] |
|
Last Name | am.ln | [String] |
|
Phone Number | am.ph | [String] |
|
Gender | am.ge | [String] |
|
Date of Birth | am.db | [String] |
|
City | am.ct | [String] |
|
State | am.st | [String] |
|
Zip | am.zp | [String] |
|
External ID | am.external_id | [String] |
|
Since the Facebook Pixel tag is e-commerce enabled, it automatically uses the default E-Commerce Extension mappings. Manually mapping in this category is not needed unless you want to override any extension mappings or your desired e-commerce variable is not offered in the extension.
Destination | Variable | Description | E-Commerce Extension Variable |
---|---|---|---|
Order ID | order_id |
|
_corder |
Sub Total | sub_total |
|
_csubtotal |
Currency | order_currency |
|
_ccurrency |
List of Product IDs | product_id |
|
_cprod |
List of Product Names | product_name |
|
_cprodname |
List of Product Quantities | product_quantity |
|
_cquan |
List of Categories | product_category |
|
_ccat |
List of Prices | product_unit_price |
|
_cprice |
Destination | Variable | Type | Description |
---|---|---|---|
Currency | currency |
[String] |
|
Content Category | content_category |
[Array,String] |
|
Content Name | content_name |
[Array,String] |
|
Content IDs | content_ids |
[Array] |
|
Content Type | content_type |
[String] |
|
Contents | contents |
[Array,JSON Object] |
|
Predicted Lifetime Value | predicted_ltv |
[String] |
|
Search String | search_string |
[String] |
|
Status | status |
[String] |
|
Number of Items | num_items |
[Number] |
|
Value | value |
[String] |
|
Set the content_type
parameter by mapping to it directly in either the Standard Tracking Parameters tab, or the Event-specific Parameter mappings.
The Content Type tab allows you to conditionally set the content_type
parameter to any of the following supported values:
destination
flight
home_listing
hotel
product
product_group
vehicle
If the mapped variable equals the value you enter in the field, then the value is set to the type you select from the drop-down list. In most cases, the values product
or product_group
are used, and that value must match the content_type
you specify for the products in your product feed uploaded to Facebook. Other values are most commonly used with Dynamic Ads.
Variable | Description |
---|---|
destination |
|
flight |
|
home_listing |
|
hotel |
|
product |
|
product_group |
|
vehicle |
|
Event Name | Description |
---|---|
AddPaymentInfo |
|
AddToCart |
|
AddToWishlist |
|
CompleteRegistration |
|
Contact |
|
CustomizeProduct |
|
Donate |
|
FindLocation |
|
InitiateCheckout |
|
Lead |
|
PageView |
|
Purchase |
|
Schedule |
|
Search |
|
StartTrial |
|
SubmitApplication |
|
Subscribe |
|
ViewContent |
|
Custom |
|
In order to map a parameter for a specific event only, first select the name of the parameter from the drop-down list,
Enter the name of the parameter you want to set and then select the name of the event for which you want to set that parameter.
Variable | Description |
---|---|
AddPaymentInfo |
|
AddToCart |
|
AddToWishlist |
|
CompleteRegistration |
|
Contact |
|
CustomizeProduct |
|
Donate |
|
FindLocation |
|
InitiateCheckout |
|
Lead |
|
PageView |
|
Purchase |
|
Schedule |
|
Search |
|
StartTrial |
|
SubmitApplication |
|
Subscribe |
|
ViewContent |
|
Custom |
|
Destination | Variable | Description |
---|---|---|
Body Style | body_style |
|
Condition of Vehicle | condition_of_vehicle |
|
Country | country |
|
Drivetrain | drivetrain |
|
Exterior Color | exterior_color |
|
Fuel Type | fuel_type |
|
Interior Color | interior_color |
|
Lead Type | lead_type |
|
Make | make |
|
Model | model |
|
Postal Code | postal_code |
|
Preferred Price Range | preferred_price_range |
|
Price | price |
|
Registration Type | registration_type |
|
Search Type | search_type |
|
State of Vehicle | state_of_vehicle |
|
Transmission | transmission |
|
Trim | trim |
|
ViewContent Type | viewcontent_type |
|
VIN | vin |
|
Year | year |
|
Variable | Description |
---|---|
city |
|
country |
|
num_adults |
|
num_children |
|
region |
|
|
|
travel_start |
|
travel_end |
|
Variable | >Description |
---|---|
departing_arrival_date |
|
departing_departure_date |
|
destination_ids |
|
num_adults |
|
num_children |
|
num_infants |
|
preferred_num_stops |
|
price |
|
returning_arrival_date |
|
returning_departure_date |
|
travel_class |
|
user_score |
|
Variable | Description |
---|---|
checkin_date |
|
checkout_date |
|
city |
|
country |
|
|
|
hotel_score |
|
num_adults |
|
num_children |
|
preferred_neighborhoods |
|
preferred_price_range |
|
preferred_star_ratings |
|
region |
|
user_score |
|
Variable | Description |
---|---|
movieref |
|
Variable | Description |
---|---|
availability |
|
city |
|
country |
|
lease_start_date |
|
lease_end_date |
|
listing_type |
|
neighborhood |
|
preferred_baths_range |
|
preferred_beds_range |
|
preferred_price_range |
|
property_type |
|
region |
|
Variable | Description |
---|---|
grant |
grant cookie consent |
revoke |
revoke cookie consent |
Variable | Description |
---|---|
|
|
|
|
|
|
See the following vendor documentation for more information:
Copyright All Rights Reserved © 2008-2021