How to Track Online Orders in Google Analytics 4 and Google Ads: Pratham Online Ordering Setup Guide

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.
Nothing you build affects your live site until you publishEverything below is created inside a GTM Workspace, which is a draft area. Customers see no change until you click Submit and then Publish. If something goes wrong after publishing, you can roll back in seconds (see How to roll back).

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.

  1. Open your propertyGo to analytics.google.com and select your venue’s property.
  2. Find the data streamClick Admin (the gear icon, bottom left), then Data streams, then your web stream.
  3. 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.
Check the reporting currency nowIn Admin, Property Settings, make sure “Reporting currency” matches the currency you actually charge in, which for Australian venues is AUD. If the property is set to USD while your site sends AUD, GA4 silently converts every amount and your revenue figures will be wrong.

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
The event name must match exactlypage_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:

  1. Create the tagTags, New. Name it GA4 - Configuration. Tag Configuration, Google Analytics, Google Tag.
  2. Add your ID and the settingPaste your Measurement ID as the Tag ID. Under Configuration settings, add a row with parameter send_page_view and value false.
  3. 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

  1. Create the tagTags, New. Name it GA4 - Event - page_view. Tag Configuration, Google Analytics, Google Analytics: GA4 Event.
  2. 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.
  3. 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.
  4. Set the triggerTriggering: CE - page_view. Save.

Step 7. Create the purchase tag

  1. Create the tagTags, New. Name it GA4 - Event - purchase. Type: Google Analytics: GA4 Event, pointed at your Google tag as in Step 6.
  2. Name the eventEvent Name: purchase. Leave Event Parameters empty.
  3. Turn on ecommerce dataOpen More Settings, Ecommerce. Tick Send Ecommerce data and set Data source to Data Layer.
  4. 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.

  1. Open enhanced measurementIn GA4: Admin, Data streams, your web stream, then the gear icon in the “Enhanced measurement” section.
  2. 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_view event; click one and GA4 - Event - page_view should be under Tags Fired, with DLV - page_path showing the real path rather than undefined.
  • Orders fire in GTM PreviewPlace a test order. The purchase event should show GA4 - Event - purchase under Tags Fired, and the Variables tab should show an ecommerce object with transaction_id, value and currency. 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_view events per move means Step 5 or Step 8 was missed.
  • The purchase carries the right valuesPlace another test order and expand the purchase event 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.

Not on Pratham Online Ordering yet?Commission-free ordering with GA4 and Google Ads tracking built in.

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.

Choose one method onlyEither use the GTM conversion tag in this guide (real-time, and the best data for Smart Bidding), or import GA4 conversions into Google Ads (no GTM work, but a 24 to 48 hour delay that weakens Smart Bidding). Never both: every order would be counted twice and your return on ad spend would be overstated.

Step 1. Create the conversion action in Google Ads

  1. 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.
  2. 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.
  3. 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 example AbC-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

  1. Create the tagTags, New. Name it Google Ads - Conversion - Purchase. Tag Configuration, Google Ads, Google Ads Conversion Tracking.
  2. 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.
  3. 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

  1. Open Preview with a test gclidClick Preview and connect to your site. In the window that opens, add &gclid=test123 to the end of the address (or ?gclid=test123 if the address has no ? yet) and press Enter. Stay in that window; a new tab disconnects Tag Assistant.
  2. 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.
  3. Place a test orderIn the same session. On the purchase event, both GA4 - Event - purchase and Google Ads - Conversion - Purchase should be under Tags Fired, and the Ads tag should show your ID, label, the order value, the order ID and AUD. Any undefined means 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:

  1. Export the finished containerIn the completed container: Admin, Export Container, pick the version you published and download the .json file.
  2. 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.
  3. Swap in that venue’s IDsChange the Tag ID in GA4 - Configuration to 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.
  4. 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

Reported revenue is the items subtotalThe purchase value sent to GA4 and Google Ads is the total of the items ordered. It does not include delivery charges, service or card fees, tax or discounts. Revenue and return on ad spend in these reports are therefore based on food and product sales, and will not match the amount charged to the customer or your order totals in the Pratham back office. Tell anyone who reads the reports.
  • 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.

Frequently asked questions

No. The ordering site already sends a page_view event on every navigation and a purchase event after every successful order to the Google Tag Manager data layer. All of the setup happens in the Google Tag Manager, Google Analytics and Google Ads dashboards.

Either the Google tag is still sending its own page view (set send_page_view to false), or GA4's enhanced measurement option "Page changes based on browser history events" is still on. Both must be off because the ordering site sends its own page_view event.

No. The value sent to GA4 and Google Ads is the items subtotal. Delivery charges, service or card fees, tax and discounts are excluded, so reported revenue will not match the total charged to the customer.

Use one method only. The Google Ads conversion tag in Google Tag Manager reports in real time and gives Smart Bidding the best data. Importing GA4 conversions needs no tag work but is delayed by 24 to 48 hours. Using both counts every order twice.

Status can take 3 to 24 hours to update after you publish the container. If the conversion tag fired with the right values in Tag Assistant Preview, the setup is correct and you only need to wait for a real ad click and order.

No. Export the finished Google Tag Manager container, import it into each venue's container using Merge rather than Overwrite, then change the GA4 Measurement ID and the Google Ads Conversion ID and Label. Turn off history-based page views in each GA4 property separately, because that setting does not come across in the import.
Call