0% found this document useful (0 votes)
34 views5 pages

FB Browser-Side Tracking

The document provides a detailed guide on setting up the Facebook Ads Pixel for eCommerce, outlining the necessary steps and event parameters for various actions such as page views, adding to cart, initiating checkout, and purchases. It includes specific data types and formats for parameters like currency, value, content IDs, and user data. Additionally, it contains JavaScript functions to modify and retrieve data for Facebook Pixel integration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

FB Browser-Side Tracking

The document provides a detailed guide on setting up the Facebook Ads Pixel for eCommerce, outlining the necessary steps and event parameters for various actions such as page views, adding to cart, initiating checkout, and purchases. It includes specific data types and formats for parameters like currency, value, content IDs, and user data. Additionally, it contains JavaScript functions to modify and retrieve data for Facebook Pixel integration.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Facebook Ads Pixel Set - up - Ecommerce

https://developers.facebook.com/docs/meta-pixel/reference

https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching

Step 1 to install FB Base Pixel : Send “pageview” for all pages.

ViewContent

Event Parameters Type

currency string

value Integer or Float

content_ids Array of integers or strings

content_category String

content_name String

content_type String - Product

contents Array Of Objects


id = String
quantity = Number
item_price = Number

AddToCart

Event Parameters Type

currency string

value Integer or Float

content_ids Array of integers or strings

content_category String

content_name String

content_type String - Product

contents Array Of Objects


id = String
quantity = Number
item_price = Number
initiateCheckout

Event Parameters Type

currency string

value Integer or Float

content_ids Array of integers or strings

content_category String

content_name String

content_type String - Product

contents Array Of Objects


id = String
quantity = Number
item_price = Number

num_items integer

Purchase

Event Parameters Type

currency string

value Integer or Float

content_ids Array of integers or strings

content_category String

content_name String

content_type String - Product

contents Array Of Objects


id = String
quantity = Number
item_price = Number

num_items integer
user_data

Event Parameters Type

Email (em) Unhashed lowercase or hashed


SHA-256 (String)

First Name (fn) Lowercase letters (String)

Last Name (ln) Lowercase letters (String)

Phone (ph) Digits only including country code


and area code (String)

External ID (external_id) string

Gender (ge) Single lowercase letter, f or m,


(String)

Birthdate (db) Digits only with birth year, month,


then day (String) - 19920331

City (ct) Lowercase with any spaces


removed (String)

State or Province (st) Lowercase two-letter state or


province code (String)

Zip or Postal Code (zp) (String)

Country (country) Lowercase two-letter country code


(String)

FB-Content_ids modified array

function(){
var items = {{fb-dlv-items}}; // Items Array
return items.map(function(item){
return item.item_id.toString();
})
}
FB- Contents modified array

function(){
var items = {{fb-dlv-items}}; // Items Array
return items.map(function(item){
return {
id : item.item_id.toString(),
item_price : parseFloat(item.price),
quantity : item.quantity ? parseFloat(item.quantity) : 1
}
})
}

Fb phone to string

function(){
return {{fbph}}.toString();
}

TotalQuantity for num_items

function(){
var items = {{Items Array}}; //Items Array
return items.reduce(function(accumulator, currentValue)
{ return accumulator + currentValue.quantity;
},
0);
}
Contentname

function(){
var items = {{fb_dlv - items}};
return items.map(function(item){
return item.item_name.toString()
})
.join();

}
Contentcategory

function(){
var items = {{fb_dlv - items}};
return items.map(function(item){
return item.item_category;
})
.join();
}

You might also like