GTM GA4 Ecommerce Tracking for a Restaurant Website: Step-by-Step Setup
Learn how to configure GTM GA4 ecommerce tracking on a Rosuii restaurant website, check online orders, and use GA4 reports to improve marketing decisions.

GTM GA4 ecommerce tracking helps a restaurant owner see what happens before a customer places an online order. You can measure dish views, add-to-cart actions, checkout steps and completed purchases instead of relying only on website traffic. This guide explains how to connect Google Tag Manager and Google Analytics 4 to a Rosuii ordering website for a Bangladeshi restaurant.
The setup is intended for an owner, agency or marketing manager who has access to a Google account and a Rosuii panel. You do not need to edit website code. Rosuii already sends the key ordering events through the browser dataLayer. Your job is to connect those events to GA4 correctly, test them, and publish the container.
What GTM, GA4 and the dataLayer mean
Google Tag Manager, or GTM, is a system for managing tracking tags without changing your website code every time. A GTM web container holds tags, triggers and variables. The container has an ID such as GTM-XXXXXXX.
Google Analytics 4, or GA4, is the reporting platform. It receives events such as add_to_cart and purchase, then turns them into reports about users, traffic sources, products and conversions. Create a GA4 property and web data stream for the restaurant ordering website before starting the tag setup.
The dataLayer is a structured JavaScript information layer on the page. When a visitor views a dish or places an order, Rosuii pushes an event and its details into this layer. GTM reads the event and sends the relevant information to GA4.
You can install the Google tag and GA4 events directly in a website, or manage them through GTM. For this setup, use GTM. Do not install the same GA4 property directly in Rosuii and again through GTM. If both routes send the same page views and purchases, visits and sales can be counted twice. One GA4 property should have one controlled implementation.
Before you begin
- Confirm that the restaurant has a Rosuii ordering website. The tracking and pixel settings are available with the online ordering storefront, from the Starter plan.
- Prepare a Google account with access to the restaurant's GA4 property and web data stream.
- Prepare a GTM account and permission to create or publish a web container.
- Keep the GA4 Measurement ID available. It normally starts with G-.
- Use a desktop browser for the first setup and testing session.
Rosuii supports online ordering through a branded restaurant website, including online payment and cash on delivery. You can read more about the Rosuii online ordering storefront before configuring measurement.
Create a GTM container and connect it to Rosuii
1. Create the web container
Open Google Tag Manager and create an account if the restaurant does not already have one. Create a container for the restaurant's ordering website. Choose Web as the target platform. After creation, copy the container ID, which looks like GTM-XXXXXXX.
2. Paste the ID in the Rosuii panel
- Sign in to the Rosuii restaurant panel.
- Open Settings.
- Choose Online presence.
- Open Tracking & pixels.
- Paste the GTM container ID into the Google Tag Manager field.
- Save the settings.
Rosuii then loads the container on the ordering website. The tracking settings are for the customer-facing ordering website, not for tags inside the POS or management panel.
Rosuii also provides a test mode in this area. When enabled, it prints each event in the browser console. This is useful when you want to confirm that a button press or order action is producing the expected event before checking GA4.
Build the GA4 tags in Google Tag Manager
3. Add the Google tag
In GTM, create a new tag and choose the Google tag type. Enter the restaurant's GA4 Measurement ID. Set the trigger to Initialization - All Pages. This makes the base Google tag load early on every page of the ordering website.
Use the correct Measurement ID for this restaurant's property. Do not paste a different branch's ID or an agency test property into the live container. If you operate several restaurants, keep their containers and GA4 properties clearly separated.
4. Add one GA4 Event tag for ecommerce events
Create another tag and choose Google Analytics: GA4 Event. Select the Google tag you created as the configuration tag, or use the appropriate GA4 configuration option shown in your GTM account. Set the event name to the GTM variable {{Event}}. This allows the tag to use the name Rosuii sends, such as view_item or purchase.
In the event tag settings, select Send Ecommerce data from the Data Layer. This is important because the dataLayer includes item names, prices, quantities, order values and transaction details. You should not manually rebuild these values in separate tags.
5. Create the Custom Event trigger
Create a trigger with the type Custom Event. Use a regular expression for the event name and enter:
view_item|add_to_cart|begin_checkout|add_payment_info|purchase
Attach this trigger to the GA4 Event tag. The Google tag handles the basic page view, while this event tag sends the selected ecommerce actions to GA4. You can extend the trigger later if you have a specific reporting need, but start with the core funnel events above.
Rosuii's ordering website also pushes other useful events. They can be viewed in the dataLayer and browser console even if you do not send every one through this first ecommerce tag.
- page_view, including a page_type value
- view_item_list when a menu or category list is viewed
- search when a visitor searches the menu
- view_item when a dish or menu item is opened
- add_to_cart when an item enters the cart
- remove_from_cart when an item is removed
- view_cart when the cart is opened
- begin_checkout when checkout starts
- add_shipping_info when delivery information is added
- add_payment_info when a payment method step is reached
- purchase after an order is placed
- generate_lead for a reservation
- contact when a visitor taps a phone or WhatsApp contact link
A simplified add_to_cart dataLayer object may look like this:
window.dataLayer.push({ event: 'add_to_cart', ecommerce: { currency: 'BDT', value: 320, items: [{ item_id: 'chicken-biryani', item_name: 'Chicken Biryani', price: 320, quantity: 1 }] } });The exact item values depend on the menu, variation, add-on or combo selected by the customer. Treat the dataLayer as the source for ecommerce details rather than typing product values into a tag.
Test GTM GA4 ecommerce tracking before publishing
6. Use Preview mode
Click Preview in GTM and enter the restaurant ordering website URL. Tag Assistant will open a connected browser session. Browse a category, open a dish, add it to the cart and begin checkout. Check whether the relevant Custom Event appears in the event timeline and whether the GA4 Event tag fires once.
For a stronger test, place an order using a suitable test menu item or the restaurant's preferred internal process. Check the browser console with Rosuii test mode enabled. You should see the event name and its associated data. In GA4, use Realtime and DebugView to confirm that events are arriving. DebugView can take a short time to show data, so inspect both Tag Assistant and the browser console.
7. Publish the container
When the Google tag and GA4 Event tag work as expected, submit and publish the GTM container. Add a clear version name such as Rosuii GA4 ecommerce setup and write a note describing the changes. Preview mode only tests the draft workspace. It does not make the tags live for ordinary visitors.
After publishing, place one more controlled test order on the live website. Review the purchase event in GA4 after it arrives. Keep a record of the GA4 property, Measurement ID, GTM container ID and who has publishing access.
How Rosuii counts a purchase
Rosuii sends the purchase event once per placed order. Cash on delivery orders are included, not only orders paid online. The purchase value is the order total, including the applicable VAT and service charge shown in the order calculation. The transaction_id is the Rosuii order number.
This distinction matters when you compare GA4 with cash collected at the counter or with bKash and Nagad settlements. GA4 records the placed order event. It is not a replacement for your operational order, payment or day-close reports. Check the restaurant's VAT treatment with your VAT circle and configure the restaurant's pricing rules carefully.
Reports that matter for a restaurant
Purchases by traffic source
In GA4, compare purchases by source and medium, campaign or landing page. This can show whether customers are arriving from Google search, social posts, paid campaigns, direct visits or referral links. Look at both order count and purchase value. Do not judge a source only by clicks.
Add-to-cart rate and checkout drop-off
Compare visitors or item viewers with add_to_cart, begin_checkout and purchase. A large gap after add to cart may point to delivery charges, limited payment choices, unclear menu information or a technical issue. A gap at payment information deserves a closer check of the checkout experience and payment configuration.
Dishes viewed versus dishes ordered
Use item reports to compare popular viewed dishes with items in completed orders. A dish with many views but few orders may need clearer photos, a better description, a different price or more visible add-ons. A dish with fewer views but regular purchases may deserve stronger placement on the menu.
Review the numbers weekly
Choose a consistent weekly period and record sessions, item views, add-to-cart actions, checkout starts, purchases, order value and top dishes. Compare the period with the previous week, but avoid assuming that every change came from advertising. Check menu edits, holidays, weather, delivery coverage, opening hours and stock availability as well.
For ideas on attracting local customers, see these guides on restaurant marketing ideas in Bangladesh and Google Business Profile for restaurants. Use tracking to understand customer actions, not to promise a fixed sales result.
Troubleshooting common problems
| Problem | Likely cause | What to check |
|---|---|---|
| No events in Preview | The container is not loading or the trigger does not match. | Confirm the GTM ID in Rosuii, use the exact Custom Event regex, disable conflicting browser extensions and check the console. |
| Tags work in Preview but not for visitors | The GTM workspace was not published. | Submit and publish the container, then test a fresh browser session. |
| Every visit or purchase appears twice | GA4 is installed directly as well as through GTM, or duplicate tags fire. | Keep one implementation for the property and confirm that each tag fires once per event. |
| Currency is wrong | The GA4 property or event is using a different currency setting. | Check the Rosuii event currency, GA4 property settings and report currency. Rosuii restaurant transactions use BDT. |
Keep the setup maintainable
Do not give publishing access to everyone who needs to view reports. Keep a short change log for new tags and triggers. If you change the restaurant domain, menu structure or checkout flow, repeat the Preview test. Also check that transaction IDs are not changed by custom campaign pages or redirects.
Rosuii's website tracking and pixels feature supports Google Tag Manager, GA4, Meta Pixel and TikTok Pixel from the panel. The same ordering website can send standard events to those platforms, but this article covers the GTM and GA4 path only.
Start measuring your restaurant website
Correct tracking gives restaurant owners a clearer view of the customer journey from menu browsing to a placed order. It cannot replace good food, reliable fulfilment or sensible marketing, but it can show where visitors stop and which dishes deserve attention. Set up one clean implementation, test every key action and review the data regularly.
Ready to launch a branded ordering website with built-in tracking options? Create your Rosuii account at Rosuii and start setting up your restaurant's online presence.
Last updated:
By Rosuii Team · Published by Rosuii, the software provider. · About the authors
Frequently asked questions
Can I use GA4 directly and through GTM for the same Rosuii website?
Does Rosuii send cash-on-delivery orders to GA4 as purchases?
Why can I see events in GTM Preview but not in the live website?
What should a Bangladeshi restaurant check if GA4 shows the wrong currency?
Can Rosuii track reservations and phone calls as well as online orders?
Run your restaurant on Rosuii
POS, menu, inventory, payroll and more — built for Bangladeshi restaurants.
Start free

