Pratham Online Ordering already tells Google Tag Manager about every page a customer views and every order they place. To see that data in Google Analytics 4 and Google Ads, you connect it once inside your own GTM container: three variables, two triggers and three tags for GA4, then two more tags for Google Ads. No code changes are needed on your ordering site, and nothing goes live until you press Publish, so you can build and test at your own pace.
What your Pratham ordering site already sends
Your Pratham online ordering site pushes two events into the Google Tag Manager data layer, a small message queue that GTM listens to. Everything in this guide is about telling GTM what to do with these two messages.
On every page a customer moves to:
{
event: 'page_view',
page_path: '/menu',
page_location: 'https://yourvenue.com/menu',
page_title: 'Menu'
}
After every successful order:
{
event: 'purchase',
ecommerce: {
transaction_id: 'ORD-1234',
value: 50.00,
currency: 'AUD'
}
}
Why the standard GTM page view trigger is not enough
The ordering site is a single page application. When a customer taps from the home page to the menu to the cart, the browser does not load a new page; the app swaps the content in place. GTM’s built-in “Page View” trigger therefore fires only once per visit, and GA4 would think every customer looked at one page and left. The ordering site solves this by announcing each navigation and each purchase itself, and GTM listens for those announcements with Custom Event triggers instead of the built-in page triggers.
Before you start
-
Google Tag Manager: Publish permissionOn the container your ordering site uses (its ID looks like
GTM-XXXXXXX). With only Read or Edit access you can build everything but not put it live. -
Google Analytics 4: Editor or AdministratorOn the GA4 property for your venue.
-
Google Ads: Standard or Admin accessOnly needed for the Google Ads part of this guide.
Part 1: Track page views and orders in Google Analytics 4
Step 1. Check what is already in your GTM container
Go to tagmanager.google.com, open your container and click Tags. Take a screenshot of the Tags, Triggers and Variables lists before you change anything, so you have a record of the original state.
-
The list is emptyThe container is installed but does nothing yet. Follow every step, and create a new Google tag in Step 5.
-
There is a tag called “Google Tag” or “GA4 Configuration”GA4 is already running. Do not create a second one; you will edit this one in Step 5.
-
There are Meta Pixel, Google Ads, Hotjar or other tagsLeave them exactly as they are. This setup works alongside them.
Step 2. Get your GA4 Measurement ID
The Measurement ID looks like G-ABC123XYZ. It is not the same as your GTM container ID, so take care not to mix them up.
- Open your propertyGo to analytics.google.com and select your venue’s property.
- Find the data streamClick Admin (the gear icon, bottom left), then Data streams, then your web stream.
- Copy the IDThe Measurement ID is shown at the top right. If you do not have a property yet, choose Admin, Create, Property, then create a Web data stream with your ordering site’s URL; the ID appears once the stream exists.
Step 3. Create three data layer variables
These read the page details out of each page_view message. In GTM, click Variables, scroll to User-Defined Variables and click New. Name the variable, click Variable Configuration, choose Data Layer Variable, enter the data layer variable name, leave Data Layer Version on Version 2 and save. Repeat for all three:
| Variable name in GTM | Data layer variable name |
|---|---|
DLV - page_path |
page_path |
DLV - page_location |
page_location |
DLV - page_title |
page_title |
Use these names exactly, including the spaces and hyphens. Consistent names make the container easy to audit and to copy to another venue later.
Step 4. Create two custom event triggers
Click Triggers, then New. Name the trigger, click Trigger Configuration, scroll to the “Other” section and choose Custom Event. Enter the event name, leave “This trigger fires on” as All Custom Events and save. Repeat for both:
| Trigger name in GTM | Event name |
|---|---|
CE - page_view |
page_view |
CE - purchase |
purchase |
page_view and purchase, lowercase, with an underscore. One character out and the trigger never fires. This is the most common setup mistake.Step 5. Configure the Google tag
This tag loads GA4 on your site. It also holds the one setting that stops GA4 from sending its own duplicate page views.
If a GA4 tag already exists: open it and click Edit. If its type is Google Tag, go to Configuration settings, click Add row and set the parameter send_page_view to false. If its type is Google Analytics: GA4 Configuration, untick “Send a page view event when this configuration loads”. Save.
If there is no GA4 tag yet:
- Create the tagTags, New. Name it
GA4 - Configuration. Tag Configuration, Google Analytics, Google Tag. - Add your ID and the settingPaste your Measurement ID as the Tag ID. Under Configuration settings, add a row with parameter
send_page_viewand valuefalse. - Set the triggerChoose Initialization – All Pages, not “All Pages”. They are different triggers, and a configuration tag must run first. Save.
Without send_page_view = false, GA4 counts its own page view on every full page load and the ordering site sends another, so every refresh is counted twice and your sessions, bounce rate and engagement numbers become unreliable.
Step 6. Create the page_view tag
- Create the tagTags, New. Name it
GA4 - Event - page_view. Tag Configuration, Google Analytics, Google Analytics: GA4 Event. - Point it at GA4Select your Google tag from the Measurement ID dropdown. If it is not listed, choose “None – manually set ID” and paste your
G-ID. - Name the event and add parametersEvent Name:
page_view. Under Event Parameters add three rows:page_path={{DLV - page_path}},page_location={{DLV - page_location}},page_title={{DLV - page_title}}. Insert each value with the building-block icon beside the field rather than typing the braces; a typo there fails silently. - Set the triggerTriggering:
CE - page_view. Save.
Step 7. Create the purchase tag
- Create the tagTags, New. Name it
GA4 - Event - purchase. Type: Google Analytics: GA4 Event, pointed at your Google tag as in Step 6. - Name the eventEvent Name:
purchase. Leave Event Parameters empty. - Turn on ecommerce dataOpen More Settings, Ecommerce. Tick Send Ecommerce data and set Data source to Data Layer.
- Set the triggerTriggering:
CE - purchase. Save.
The ecommerce checkbox reads the order ID, value and currency straight from the ordering site’s ecommerce object, so you do not have to map each field. If product-level item data is added to the ordering site later, GA4 picks it up with no GTM changes.
Step 8. Turn off GA4’s own history-based page views
Do not skip this. GA4 has a built-in workaround for single page applications that is switched on by default. Left on, every navigation is counted twice: once by GA4 and once by the tag you just built.
- Open enhanced measurementIn GA4: Admin, Data streams, your web stream, then the gear icon in the “Enhanced measurement” section.
- Switch off history eventsExpand “Page views” and turn off Page changes based on browser history events. Save.
This is a Google Analytics setting, not a GTM one, so it does not travel with a GTM export. If you set up more than one venue, it has to be done for each property.
Step 9. Preview and verify
GTM Preview proves the tags fired; GA4 DebugView proves the data actually arrived. Check both.
-
Page views fire in GTM PreviewClick Preview, enter your ordering site’s URL and Connect. Move around the site (home, menu, cart). Each move should add a
page_viewevent; click one andGA4 - Event - page_viewshould be under Tags Fired, withDLV - page_pathshowing the real path rather thanundefined. -
Orders fire in GTM PreviewPlace a test order. The
purchaseevent should showGA4 - Event - purchaseunder Tags Fired, and the Variables tab should show an ecommerce object withtransaction_id,valueandcurrency. The value must be a number, not text in quotes. -
Exactly one page view per navigation in DebugViewWith Preview still running, open GA4 Admin, DebugView and navigate the site. Two
page_viewevents per move means Step 5 or Step 8 was missed. -
The purchase carries the right valuesPlace another test order and expand the
purchaseevent in DebugView. Confirm the value, currency and order ID.
Step 10. Publish
Click Submit. Give the version a clear name such as “GA4 page_view + purchase via dataLayer”, list what you added in the description, and click Publish. Good version names are what make a rollback quick if you ever need one.
Part 2: Track orders as Google Ads conversions
Finish Part 1 first; Part 2 reuses the CE - purchase trigger. When someone clicks your Google Ad, Google adds a click ID (gclid) to the landing page URL. A Conversion Linker tag stores that ID in a first-party cookie, and when the customer later places an order, the conversion tag reports the sale with the stored click ID so Google credits the right campaign.
Step 1. Create the conversion action in Google Ads
- Start a new conversion actionIn Google Ads: Goals, Conversions, Summary, then + New conversion action, Website. Enter your ordering site’s URL, click Scan, then choose + Add a conversion action manually. Ignore Google’s auto-detected suggestions; a GTM tag is more accurate.
- Fill in the formGoal: Purchase. Name: something clear such as “Website Purchase”. Value: Use different values for each conversion, so each order reports its own amount. Count: Every, so a customer who orders ten times counts ten times. Leave the 30-day click-through window and Data-driven attribution as they are.
- Save your Conversion ID and LabelClick Done, then Save and continue, and choose Use Google Tag Manager. Copy the Conversion ID (
AW-123456789) and Conversion label (for exampleAbC-D_efGh12xyz). You can find them again later under the conversion action’s Tag setup.
Step 2. Create three ecommerce variables
The GA4 tag reads the ecommerce object on its own; the Google Ads tag cannot, so each value needs its own variable. Create them exactly as in Part 1, Step 3:
| Variable name in GTM | Data layer variable name |
|---|---|
DLV - ecommerce.transaction_id |
ecommerce.transaction_id |
DLV - ecommerce.value |
ecommerce.value |
DLV - ecommerce.currency |
ecommerce.currency |
The dot is correct: GTM reads it as a path into the nested object. The Data Layer Version must be Version 2. Version 1 cannot read nested values and always returns undefined, which is the most common failure in this part.
Step 3. Add the Conversion Linker tag
Tags, New. Name it Conversion Linker, choose the Conversion Linker tag type, change nothing inside, set Triggering to Initialization – All Pages and save. One tag covers the whole site. Without it, most conversions are simply never recorded, and nothing warns you.
Step 4. Add the conversion tracking tag
- Create the tagTags, New. Name it
Google Ads - Conversion - Purchase. Tag Configuration, Google Ads, Google Ads Conversion Tracking. - Fill in the fieldsConversion ID and Conversion Label from Step 1. Conversion Value:
{{DLV - ecommerce.value}}. Transaction ID:{{DLV - ecommerce.transaction_id}}. Currency Code:{{DLV - ecommerce.currency}}. Insert the variables with the building-block icon. - Set the triggerTriggering:
CE - purchase, the trigger from Part 1. Save.
Always fill in Transaction ID. If the confirmation screen is refreshed or the tag fires twice, Google uses the order ID to recognise and discard the duplicate. Leave it empty and revenue can be counted twice.
Step 5. Test with a dummy click ID
- Open Preview with a test gclidClick Preview and connect to your site. In the window that opens, add
&gclid=test123to the end of the address (or?gclid=test123if the address has no?yet) and press Enter. Stay in that window; a new tab disconnects Tag Assistant. - Confirm the cookie was writtenOpen the browser console (F12) and run the line below. You should see something like
["_gcl_aw=GCL.1786703998.test123"]. An empty[]means the Conversion Linker is not firing. - Place a test orderIn the same session. On the
purchaseevent, bothGA4 - Event - purchaseandGoogle Ads - Conversion - Purchaseshould be under Tags Fired, and the Ads tag should show your ID, label, the order value, the order ID andAUD. Anyundefinedmeans a variable name in Step 2 is wrong.
document.cookie.split('; ').filter(c => c.startsWith('_gcl'))
test123 is not a real ad click, so this test will not show up in Google Ads reports. It proves the linker, the cookie and the conversion tag all work; real attribution is confirmed by a real ad click after you publish.
Step 6. Publish and check the status in Google Ads
Submit and publish with a version name such as “Google Ads purchase conversion”. Then go to Goals, Conversions, Summary in Google Ads and watch the Status column:
| Status | What it means |
|---|---|
| Unverified | No conversions received yet. Normal straight after setup. |
| Recording conversions | Working correctly. |
| No recent conversions | It worked before and has stopped. Something has changed. |
| Tag inactive | The tag is not being seen. Usually the container was not published, or the trigger is wrong. |
Status can take 3 to 24 hours to update. If your Step 5 test passed, the setup is right; do not change it while you wait. Conversion counts and values appear within a day or two.
Running more than one venue or brand?
Each venue has its own GTM container, GA4 property and, usually, its own Google Ads account. You do not need to rebuild everything each time:
- Export the finished containerIn the completed container: Admin, Export Container, pick the version you published and download the .json file.
- Import with Merge, never OverwriteIn the next venue’s container: Admin, Import Container, choose the file, pick the Default Workspace and select Merge, Rename conflicting tags, triggers and variables. Overwrite deletes everything already in that container, including tags like Meta Pixel.
- Swap in that venue’s IDsChange the Tag ID in
GA4 - Configurationto that venue’s Measurement ID. If the venue runs Google Ads, create its own conversion action and replace both the Conversion ID and Label in the Ads tag; if it does not, leave the Ads tag out. - Repeat the GA4-only setting, test, publishTurn off history-based page views (Part 1, Step 8) in that venue’s GA4 property, because it does not come across in the import. Run the Preview checks, then publish. Once the export file exists, each venue takes a few minutes.
Things to know about the numbers
-
Currency falls back to AUDIf your venue’s settings have not loaded when an order completes, the ordering site reports the currency as AUD. If you trade in another currency, confirm in DebugView that the right one is coming through before relying on the reports.
-
Send each platform its orders one way onlyGA4 gets purchases from this GTM tag or from a server-side integration, never both. Google Ads gets them from the GTM conversion tag or a GA4 import, never both. Duplicating either silently doubles revenue.
-
Google Ads and GA4 will not match exactlyThey use different attribution models. That is normal and needs no action.
-
Enhanced Conversions is a later stepGoogle’s Enhanced Conversions sends hashed customer email and phone details to improve match rates. It needs extra customer data in the data layer and a policy acceptance in Google Ads, so it is outside this setup. Consider it once the basic tracking has run cleanly for a week or two.
Troubleshooting
Check that the container is published first. An unpublished container is by far the most common reason a setup looks broken.
| What you see | Likely cause | Where to look |
|---|---|---|
No page_view event in Tag Assistant |
The container is not loading on the ordering site | Console: type window.dataLayer; contact our support team if it is empty |
| Event appears but the tag is under “Tags Not Fired” | Trigger event name misspelled | Part 1, Step 4 |
Variables show undefined |
Wrong variable name, or Version 1 selected | Part 1, Step 3 and Part 2, Step 2 |
| Two page views per navigation | History-based page views still on in GA4 | Part 1, Step 8 |
| Two page views on a full page load | send_page_view not set to false |
Part 1, Step 5 |
| Works in Preview, nothing on the live site | Container not published | Part 1, Step 10 |
| DebugView empty but GTM shows the tag fired | Wrong Measurement ID, or an ad blocker | Part 1, Step 2; retest in an incognito window |
| Revenue shows as 0 | Currency missing or property currency mismatch | Part 1, Step 2 |
_gcl_aw cookie never appears |
Conversion Linker missing or on the wrong trigger | Part 2, Step 3 |
| Conversion value always 0 | “Use different values for each conversion” not selected | Part 2, Step 1 |
| One order counted twice in Google Ads | Transaction ID left empty | Part 2, Step 4 |
How to roll back
If anything misbehaves after publishing, open Versions in GTM, find the version published before your change, click the three-dot menu beside it and choose Publish. The container returns to its previous state immediately, with no change needed on your ordering site.
Your finished container at a glance
Use this list to audit a container quickly. Every venue should end up with:
| Item | Type | Trigger / key setting |
|---|---|---|
DLV - page_path, DLV - page_location, DLV - page_title |
Data Layer Variable, Version 2 | Same name without the DLV - prefix |
DLV - ecommerce.transaction_id, .value, .currency |
Data Layer Variable, Version 2 | Google Ads only |
CE - page_view, CE - purchase |
Custom Event trigger | All Custom Events |
GA4 - Configuration |
Google Tag | Initialization – All Pages; send_page_view = false |
GA4 - Event - page_view |
GA4 Event | CE - page_view; three page parameters |
GA4 - Event - purchase |
GA4 Event | CE - purchase; Send Ecommerce data from Data Layer |
Conversion Linker |
Conversion Linker | Initialization – All Pages; defaults |
Google Ads - Conversion - Purchase |
Google Ads Conversion Tracking | CE - purchase; ID, label, value, order ID, currency |
Outside GTM, two GA4 settings complete the setup: the reporting currency matches what you charge, and “Page changes based on browser history events” is off.
Want to grow the orders you are now measuring? Our guide to commission-free online ordering covers delivery zones, promo codes and order notifications, and a branded website and app puts ordering under your own name. If you would like a hand with the setup, contact our team or call 1300 941 886.




