Overview
This article explains how to add Meta, TikTok, and Snapchat tracking through Google Tag Manager (GTM) for the Lunchbox web ordering site. GTM is the one place where all ad tracking lives. Tracking through GTM applies to the web ordering site only, not the mobile apps.
Prerequisites
The restaurant’s GTM container ID must be saved in the Lunchbox Admin Dashboard under Design > Web > Tracking Ids.
Each pixel must be set up in one place only. If the pixel code was also added directly to the site or to another tool, remove that copy.
The Tracking IDs screen also has a Meta Pixel Identifier field. If the restaurant’s Meta pixel is saved there and the restaurant now adds Meta in GTM, clear that field. If Meta runs in both places, every order is counted twice, so we need to avoid that scenario.
Setup in Google Tag Manager
The restaurant’s team completes the setup in its own GTM container, in this order:
Create the variables (Step 1).
Create the triggers (Step 2).
Add the template for each platform the restaurant uses (Step 3).
Add the tags for each platform (Step 4).
Test and publish (Step 5).
Steps 1 to 3 are done once and are shared by all platforms.
Step 1: Tell GTM where to find the order number
In the GTM workspace, go to Variables. Under User-Defined Variables, click New
Click Variable Configuration and choose Data Layer Variable.
In Data Layer Variable Name, enter
ecommerce.transaction_id.Leave Data Layer Version on Version 2.Name it
DLV - ecommerce.transaction_idand click Save.
For TikTok and Snapchat, repeat steps 1 to 4 for
ecommerce.value(name itDLV - ecommerce.value) andecommerce.currency(name itDLV - ecommerce.currency). Meta doesn't need these.
This is how User-Defined Variable looks after saving
Step 2: Tell GTM when to send the order details
Go to Triggers and click New.
Click Trigger Configuration and choose Custom Event.
In Event name, enter
purchase. Leave it on All Custom Events. Click Save.
In the Rename Trigger window, enter
Event - purchaseand click Save
💡The event names must match exactly: all lowercase
Step 3: Add the pixel templates
Go to Templates. Under Tag Templates, click Search Gallery.
Search for the platform’s template, open it, and click Add to workspace.
Repeat steps 1 and 2 for each platform the restaurant uses.
Platform | Template name | Published by |
Meta | Meta Pixel | |
TikTok | TikTok Pixel | TikTok |
Snapchat | Snap Pixel | Snapchat |
Here's the Tag Template library with all three templates
Step 4: Add the tags
Add the tags for each platform the restaurant uses. Each platform needs 2 tags: a page view tag and a purchase tag. The settings for each platform are in Meta tags, TikTok tags, and Snapchat tags at the end of this article.
Step 5: Test, then publish
Click Preview, enter the ordering site address, and place a test order.
In Tag Assistant, check that each page view tag fired on every page and each purchase tag fired once on the purchase.
Check the same events in each platform's test tools:
For Meta, use Meta Pixel Helper and Test Events in Meta Events Manager.
For TikTok, use TikTok Pixel Helper and Test Events in TikTok Events Manager.
For Snapchat, use Snap Pixel Helper and Test Events in Snapchat Events Manager.
In GTM, click Submit, enter a version name, and click Publish.
💡Nothing fires until the tags are published.
Meta tags
Follow these steps to add the Meta page view tag and purchase tag.
Go to Tags and click New
Click Tag Configuration. Under Gallery, click Meta Pixel. The ADDED label next to the template means it was added to the workspace in Step 3 (above)
Fill in the settings from the table below
Click Triggering and choose the trigger from the table below.
Name the tag and click Save.
Repeat steps 1 to 5 for the second tag.
Meta tag settings
Setting | Page view tag | Purchase tag |
Facebook Pixel ID(s) | Restaurant’s Meta Pixel ID | Restaurant’s Meta Pixel ID |
Enhanced Ecommerce dataLayer Integration | Unchecked | Unchecked |
Use GA4 dataLayer Integration | Checked | Checked |
Event Name | Standard > PageView | Standard > Purchase |
Consent Granted (GDPR) | True | True |
Enable Advanced Matching | Unchecked | Unchecked |
Object Properties | False, no properties added | False, no properties added |
More Settings > Event ID | Leave blank | DLV - ecommerce.transaction_id |
Triggering | Initialization - All Pages | Event - purchase |
To choose a variable, click the brick icon next to the field.
The Event ID on the purchase tag lets Meta count each order only once.
Leave all other settings as they are. Two settings are optional:
Opt in to a Meta-enabled Conversions API integration is a terms agreement with Meta and is checked by default. The restaurant decides whether to keep it.
Limited Data Use (LDU) stays unchecked unless legal asks for it.
TikTok tags
Page view tag (pending confirmation)
Go to Tags and click New.
Click Tag Configuration. Under Gallery, click TikTok Pixel.
In Pixel ID, enter the restaurant's TikTok Pixel ID.
In Event Name, choose Page View. (pending confirmation: the Event Name list has no Page View option)
Click Triggering and choose Initialization - All Pages.
Name the tag and click Save.
Purchase tag
Go to Tags and click New.
Click Tag Configuration. Under Gallery, click TikTok Pixel.
In Pixel ID, enter the restaurant's TikTok Pixel ID. It's in TikTok Ads Manager, under Events Manager.
In Event Name, choose CompletePayment. This is TikTok's name for a paid order. Don't choose a variable from this list. This field is only for the event name.
Under Properties, keep Use Google Analytics E-commerce Data Layers (Recommended) checked. In Currency, choose DLV - ecommerce.currency. (pending confirmation: Paul said the order value also goes here, but the template has no Value field)
Under De-duplication Configurations, in Event ID, choose DLV - ecommerce.transaction_id.
Leave Additional Properties empty.
Click Triggering and choose Event - purchase.
Name the tag and click Save.
To choose a variable, click the brick icon next to the field. Leave all other settings as they are.
Snapchat tags
Page view tag
Go to Tags and click New.
Click Tag Configuration. Under Gallery, click Snap Pixel.
In Pixel ID, enter the restaurant's Snap Pixel ID. It's in Snapchat Ads Manager, under Events Manager.
In Event Type, keep Page View. It's selected by default.
Leave all user fields blank, such as User Email, User Phone Number, and User First Name.
Click Triggering and choose All Pages.
Name the tag and click Save.
Purchase tag
Go to Tags and click New.
Click Tag Configuration. Under Gallery, click Snap Pixel.
In Pixel ID, enter the restaurant's Snap Pixel ID.
In Event Type, choose Purchase.
In Price, click the brick icon and choose DLV - ecommerce.value.
In Currency, click the brick icon and choose DLV - ecommerce.currency.
In Transaction ID, click the brick icon and choose DLV - ecommerce.transaction_id.
Leave all other fields blank.
Click Triggering and choose Event - purchase.
Name the tag and click Save.




















