ShopBase Help Center

Explore How-To's and learn eCommerce best practices from our knowledge base.

Home Set up Facebook Pixel IDs and Conversions API

Set up Facebook Pixel IDs and Conversions API

This article is also available in:

This article explains how to integrate Facebook Pixel and Access Token to set up pixel and conversions API in ShopBase, helping you create effective ads campaigns for your store.

A. Creating Facebook pixel & Access Token

To integrate Facebook Pixel with your ShopBase store, you need to create a Facebook Pixel in Facebook Events Manager.

If you want to use Conversions API, you can also generate an Access Token for your Pixel.

See this guide for detailed instructions: Create Facebook Pixel & Access Token.

B. Types of Facebook Pixel & Conversions API in ShopBase

ShopBase currently supports 3 types of Facebook Pixel & Conversion API.

  • Universal Facebook Pixel & Conversion API: Track customer activities across the entire store.

  • Product-specific Facebook Pixel & Conversion API: Track customer activities for a specific product only.

  • Collection-specific Facebook Pixel & Conversion API: Track customer activities for products within a specific collection only.

It is optional, but recommended, to have both Facebook Pixel ID and Access Token.

You must set up the Universal Facebook Pixel & Conversion API before installing any product-specific or collection-specific pixel.

C. Set up Universal Facebook Pixel & Conversion API

  1. Log in to your store admin & paste the Pixel ID and access token.

    Go to Marketing & Sales > Sales Channel > Facebook.

    Paste the Pixel ID and access token into the corresponding fields. If you use the Theme Editor, go to Online Store > Preferences > Facebook Pixel & Conversions API.

  2. Click Save once finished.

You can attach multiple universal Facebook Pixel IDs into your ShopBase online store by clicking Add other pixel IDs.

D. Set up product-specific Facebook Pixel & Conversion API

Go to Products > All products and select the product where you want to set up the Pixel ID & Conversions API.

In the product detail page, navigate to Facebook Pixel & Conversion API, paste the Pixel ID and Access Token.

Click Save changes once finished.

When a product is cloned and imported to another ShopBase store, the original product's Pixel ID and Access Token can be preserved.

E. Set up collection-specific Facebook Pixel & Conversion API

Go to Products > Collections and select the collection where you want to set up the Pixel ID & Conversion API.

In the collection detail page, navigate to Facebook Pixel & Conversion API, paste the Pixel ID and Access Token.

Click Save changes once finished.

For the Pixel ID & Access Token attached in a product/collection to work, you must first install the Universal Pixel ID in your store.

Only 1 Pixel ID & Access Token can be attached to each product or collection, and the Access Token must match its Pixel ID.

F. Facebook pixel events

After you integrate a Facebook pixel with your online store, it automatically tracks 6 standard events and 4 custom events, with their descriptions as follows:

Standard events

  • Search: trigger when a visitor makes a search.

  • ViewContent: trigger a visitor views a product page.

  • AddToCart: trigger when a visitor adds a product to the shopping cart.

  • InitiateCheckout: trigger when a visitor clicks on the checkout button.

  • AddPaymentInfo: trigger when a visitor enters payment information in the checkout.

  • Purchase: trigger when a customer completes a purchase and views the thank you page.

Custom events

  • CheckoutButtonClicked: trigger when a visitor clicks Checkout Button on Cart Drawer or Cart Page.

  • AddShippingInfo: trigger when a visitor submits shipping info and click button Continue to Shipping method (3-step checkout only).

  • SelectShippingMethod: trigger when a visitor selects a shipping method and click button Continue to Payment method (3-step checkout only).

  • UseCouponCode: trigger when user applies coupon code successfully.

G. Event parameters sent to Facebook

  • Search: search_string

  • ViewContent: content_ids, content_name, content_type, content_category, currency, value

  • AddToCart: content_ids, content_type, content_category, currency, value

  • InitiateCheckout: content_category, contents, content_brand, currency, value, num_items

  • Purchase: content_category, contents, content_brand, currency, value, num_items

  • CheckoutButtonClicked: content_ids, content_type, currency, value, num_items

  • BuyNowButtonClicked: content_ids, content_type, currency, value, num_items

  • UseCouponCode: coupon

Required parameters (sent from server):

  • event_name

  • event_time

  • user_data

  • custom_data

  • event_source_url

  • event_id

  • action_source

Customer information parameters (sent from both browser and server) :

  • em (email)

  • ph (phone)

  • ge (gender)

  • db (date of birth)

  • ln (last name)

  • fn (first name)

  • ct (city)

  • st (state)

  • zp (zip code)

  • country (country)

  • external_id (external ID)

  • client_ip_address (client IP address)

  • client_user_agent (client user agent)

  • fbc (click ID)

  • fbp (browser ID)

  • subscription_id (subscription ID)

  • fb_login_id (Facebook login ID)

  • lead_id (lead ID)

Some parameters are hashed as recommended by Facebook.

Updated 1 day ago