-
Website
-
3min Explainer Walkthrough
- Generate a Design
-
Page Management
-
Page Editing
-
Form Builder
- Updating Your Navigation Menu
- Creating Page Redirectors
- Posts Management
-
Search Engine Optimization (SEO)
- Setting Up Google Marketing Tools
- Setting Up Meta Pixel And E-commerce Tracking
- Setting Up Microsoft Marketing Tools
- Setting Up Reddit Pixel and E-commerce Tracking
- Setting Up Linkedin Insight Tag
- Optimizing Images For Web
-
Analytics
- Third Party Embed Code
- Special Files
- Setting Up OpenAI Ads Manager
-
3min Explainer Walkthrough
- Contacts
-
Marketing
-
Email Marketing
-
Automation
- SMS Marketing
-
Events Management
- Connecting Social Media
- Complying With Spam Laws (Australia)
- Changing Your Sender E-mail Address
- Change Links After Email Sent
-
Email Marketing
- Commerce
- Apps
- Settings and Config
- Setting Up E-commerce Tracking for Meta Ads (GTM)
- Website
-
-
3min Explainer Walkthrough
- Generate a Design
-
Page Management
-
Page Editing
-
Form Builder
- Updating Your Navigation Menu
- Creating Page Redirectors
- Posts Management
-
Search Engine Optimization (SEO)
- Setting Up Google Marketing Tools
- Setting Up Meta Pixel And E-commerce Tracking
- Setting Up Microsoft Marketing Tools
- Setting Up Reddit Pixel and E-commerce Tracking
- Setting Up Linkedin Insight Tag
- Optimizing Images For Web
-
Analytics
- Third Party Embed Code
- Special Files
- Setting Up OpenAI Ads Manager
-
3min Explainer Walkthrough
- Contacts
- Marketing
- Commerce
- Apps
- Settings and Config
Setting Up E-commerce Tracking for Meta Ads (GTM)
Meta Ads e-commerce tracking helps you measure orders and their transaction values. If you installed the Meta Pixel through Google Tag Manager (GTM), this guide shows you how to send Oncord order data to Meta.
How E-commerce Tracking Works
When a customer places an order, Oncord generates a purchase event on the order success page and passes the transaction ID, order value and currency through the data layer.
A Meta Purchase tag in Google Tag Manager reads this information and sends it to Meta Events Manager. You can use these events to measure purchases, revenue and return on ad spend (ROAS) from your ads.
Before You Begin
Make sure you have:
- Created a Google Tag Manager account and container.
- Installed Google Tag Manager on your Oncord website.
- Created a Meta Pixel and have access to its dataset in Meta Events Manager.
- Installed the Meta Pixel through Google Tag Manager.
You will also need your Meta Pixel ID. To find it, see Install the Meta Pixel through Google Tag Manager.
Create the Purchase Event Trigger
First, create a trigger that detects the purchase event Oncord generates after an order is placed.
- Log in to your Google Tag Manager account.
- Select the container installed on your Oncord website.
- Click Triggers in the left menu.
- Click New.
- Enter a meaningful trigger name, such as Meta Ads Purchase Event.
- Click Trigger Configuration.
- Select Custom Event.
- Enter purchase in the Event name field.
- Under This trigger fires on, select Some Custom Events.
- Set the condition to {{Event}} equals purchase.
- Click Save.
Create the Order Data Variables
Next, create Data Layer Variables that retrieve the transaction ID, order value and currency from the Oncord purchase event. If these variables already exist in your container, check their settings and reuse them.
Create the Order ID Variable
- Click Variables in the left menu.
- Under User-Defined Variables, click New.
- Enter Order ID as the variable name.
- Click Variable Configuration.
- Select Data Layer Variable.
- Enter ecommerce.transaction_id in the Data Layer Variable Name field.
- Select Version 2 for the Data Layer Version.
- Click Save.
This variable returns the Oncord order number shown on the order success page. You will use it for the order number sent to Meta and for the Event ID.
Create the Order Value Variable
- Under User-Defined Variables, click New.
- Enter Order Value as the variable name.
- Click Variable Configuration.
- Select Data Layer Variable.
- Enter ecommerce.value in the Data Layer Variable Name field.
- Select Version 2 for the Data Layer Version.
- Click Save.
Create the Order Currency Variable
- Under User-Defined Variables, click New.
- Enter Order Currency as the variable name.
- Click Variable Configuration.
- Select Data Layer Variable.
- Enter ecommerce.currency in the Data Layer Variable Name field.
- Select Version 2 for the Data Layer Version.
- Click Save.
This variable returns the three-letter currency code associated with the order, such as AUD, USD or EUR.
Create the Meta Purchase Tag
After creating the trigger and variables, create the tag that sends the order data to Meta.
- Click Tags in the left menu.
- Click New.
- Enter a meaningful tag name, such as Meta Pixel - Purchase.
- Click Tag Configuration.
- Select Meta Pixel.
If the tag type is not listed, open the Community Template Gallery and search for Meta Pixel. Choose the template published by facebook.
Configure the Event
- Enter your Pixel ID in Facebook Pixel ID(s).
- Leave Enhanced Ecommerce dataLayer Integration unchecked.
- Leave Use GA4 dataLayer Integration unchecked.
- Under Event Name, select Standard.
- Select Purchase.
- Leave Consent Granted (GDPR) set to True, unless your website uses a consent banner that controls tracking.
Add the Order Parameters
- Expand Object Properties.
- Set Load Properties From Variable to False.
Add these three properties. For each one, click Add property, enter the name under Property Name, then select the variable under Property Value:
- value - Order Value
- currency - Order Currency
- order_id - Order ID
Enter the names exactly as shown, in lower case.
Add the Event ID
- Expand More Settings.
- Enter purchase_{{Order ID}} in Event ID.
The Event ID field is separate from the order_id property. Include both.
Assign the Purchase Trigger
- Click Triggering.
- Select the Meta Ads Purchase Event trigger you created earlier.
- Click Save.
The tag now sends a Purchase event to Meta when Oncord generates the purchase event after an order is placed.
Test the Purchase Event
Test the configuration before publishing it.
Use Google Tag Manager Preview Mode
- Click Preview in Google Tag Manager.
- Enter your Oncord website URL and connect Tag Assistant.
- Place a test order on your website.
- In Tag Assistant, select the purchase event.
- Confirm that Meta Pixel - Purchase shows Succeeded.
- Open the Variables tab for that event.
- Confirm that Order ID, Order Value and Order Currency contain the expected values.
For an AUD 20.00 order numbered 1039, the expected values are:
- Order ID: 1039
- Order Value: 20.00
- Order Currency: AUD
Publish the Changes
Once the purchase tag fires correctly:
- Return to Google Tag Manager.
- Click Submit.
- Enter a version name and description.
- Publish the container changes.
Meta can now receive a Purchase event, with the order value and currency, for each order placed on your Oncord website.
To check that Meta is receiving your orders, and for the problems that come up most often, see Testing and Troubleshooting Meta Ads Tracking.