Facebook Analytics & Custom Audiences

Facebook Analytics & Custom Audiences

This tutorial will guide you through the process of configuring the Facebook Analytics & Custom Audiences. Server is tracking allows UltraCart to communicate a conversion using an API instead of JavaScript on the receipt. The primary advantages of this are:

  1. Capture revenue associated with upsell abandons.

  2. Capture revenue associated with Accounts Receivable Retry.

  3. Capture revenue with declined card updates.

  4. Capture revenue associated with AVS capture.

Obtaining the Access Token

Within the Facebook Events Manager click on your existing pixel. Then click Setup → Setup Server Side API.

Click Next, Next then Setup as shown below.

 

 

Select the proper existing pixel as shown below.

Click Create New App as shown below.

Name the app something similar to what is shown below, enter your email, keep live selected then click create app.

The app should now be selected. Click Next.

Enter a name for a system user as shown below then click create.

Select the system user you just created and click next.

Click the Generate Access Token button as shown below.

Copy the access token off to your clipboard then click next.

Click Done.

Configuring the UltraCart Facebook Tracking.

Under your StoreFront click on Privacy and Tracking then click on Other as shown below.

image-20250821-131613.png

 

Scroll down to the Facebook section and configure the access token below the pixel id as shown below.

image-20250821-131644.png

Facebook Pixel & Conversions API

This section allows you to integrate your UltraCart StoreFront with Facebook to track user behavior and measure the effectiveness of your ad campaigns. You can configure both the standard Facebook Pixel (client-side tracking) and the Conversions API (server-side tracking) to ensure comprehensive and reliable data collection.

 

Configuration Fields

  • Conversion Pixel Ids:

    • Enter your Facebook Pixel IDs, one per line.

    • This ID connects your StoreFront to your Facebook Ad account, enabling the standard client-side tracking of user actions on your website.

  • Server-Side Access Token:

    • Enter your Server-Side Access Token to enable the Facebook Conversions API.

    • This is a highly recommended setting as it provides a more reliable method of tracking conversions by sending data directly from UltraCart's server to Facebook. It is not susceptible to browser privacy settings or ad blockers.

    • Note: This token can only be used with a single Conversion Pixel ID.

  • Override event_source_url (optional):

    • This field allows you to manually specify the URL that appears as the source of your conversion events in Facebook's reporting.

    • Use this if you need to attribute conversions to a specific, consistent URL rather than the one the customer was on at the time of the purchase.

 

Advanced Settings & Permissions

These settings allow you to define the user consent required for different types of tracking data to be sent to Facebook. You can configure these permissions based on customer location to comply with regional privacy laws.

  • Opt in to: Check the boxes for the types of data you wish to send to Facebook, based on customer consent.

    • Statistics: General analytics and event data.

    • Preferences: Data related to user preferences.

    • Marketing: Data used for targeted advertising and remarketing.

  • Required for: Select the customer group for whom these permissions are required.

    • All Customers

    • EEA Customers (European Economic Area)

    • Non-US Customers

 

Standard Events

The Facebook integration automatically tracks and reports the following standard events to your Facebook account. These events are crucial for optimizing your ad campaigns and building targeted audiences.

  • AddPaymentInfo

  • AddToCart

  • AddToWishlist

  • CompleteRegistration

  • InitiateCheckout

  • Lead

  • Search

  • ViewContent

Subscription (auto order) event handling

UltraCart distinguishes one-time purchases from subscription activity when reporting to Meta. This keeps the standard Purchase count in Ads Manager accurate and gives merchants a separate signal they can optimize against for recurring revenue if they choose.

Event mapping

Order type

Event sent to Meta

Order type

Event sent to Meta

One-time purchase

Purchase (standard)

First purchase of an auto order (subscription)

Purchase (standard, with a hashed subscription identifier)

Auto-order rebill (recurring payment)

RecurringSubscriptionPayment (custom event)

Auto-order cancellation

CancelSubscription (custom event)

Rebill events are sent with action_source = "system_generated" and carry revenue value and currency so they can still feed LTV-focused campaign optimization for merchants who register the custom event in Events Manager.

Pixel and CAPI deduplication

UltraCart's Meta Pixel fires the Purchase event only on the receipt page of a real order. It uses the same event_id as the server-side CAPI call, so Meta deduplicates pixel and CAPI into a single Purchase for that order. Rebills occur on UltraCart's server with no customer browser present, so no pixel event can fire on a rebill — the CAPI RecurringSubscriptionPayment is the only signal.

Why rebills are a custom event instead of Purchase

Meta's best practice is for subscription renewals to be reported separately from new acquisitions. Reporting rebills as Purchase would:

  • Inflate the headline Purchase count in Ads Manager

  • Feed Meta's optimizer misleading signals about new-customer acquisition rates

Rebills still carry the revenue signal, so merchants can build campaign optimization around rebill revenue by registering RecurringSubscriptionPayment as a custom conversion in Events Manager.

Optimizing against rebill revenue (optional)

If you want Meta's optimizer to bid on rebill activity (recommended for LTV-style campaigns):

  1. In Meta Events Manager, open your pixel and select Custom Conversions.

  2. Create a custom conversion mapped to the event name RecurringSubscriptionPayment.

  3. In Ads Manager, select that custom conversion as the optimization event when building a campaign.

Cancellations (CancelSubscription) can be registered the same way if you want to use them as a signal.

Related platform docs

The custom event name RecurringSubscriptionPayment is consistent across Meta, TikTok, and Pinterest. See also: TikTok Tracking, Pinterest Tracking, Snapchat Tracking, Twitter Tracking, Taboola Tracking.

Tracking Landing Pages External to StoreFronts

If you are sending Facebook traffic to an external site such as a landing page or custom checkout, please make sure you have properly deployed UltraCart Analytics Tracking. This is necessary to plumb Facebook data to support server-to-server conversion reporting.