The easiest way to integrate Google Tag Manager (and Google Analytics) with Olo Serve is to use this template to automatically create custom GTM events for each "global event" emitted from Olo Serve. These custom events map to each of the GA Enhanced Ecommerce activities, and they can be used to pass data from Serve to GA.
Read more about Olo Serve's global data and events here.
-
Oct 3, 2024
- Adding missing measurementIdOverride key, for the rest of the templates, that was causing issues while importing the container.
-
Dec 12, 2023
- Adding missing measurementIdOverride key that was causing issues while importing the container.
-
Aug 29, 2023
- Prior to this date, Dispatch orders were not reporting revenue in GA4. This has been fixed on the application side, no action is required.
-
Aug 2, 2023
- There is a bug in reporting the revenue in Google Analytics resulting in the Revenue being inconsistently captured. We have not identified a work around for this. (https://support.google.com/analytics/thread/116545705/ga4-product-revenue-not-populating?hl=en)
-
Jul 1, 2023
-
Jan 19th, 2022
- Call out - GA4 is not supported for Serve Apps. This is due to Google not supporting GA4 on Hybrid Apps (https://issuetracker.google.com/issues/174954288)
-
June 10, 2021
- Added GA4 support
- Event name changes
productsVisible
event becameimpressions
to match UA standardviewProductDetail
event becamedetail
to match UA standardclickProductLink
event becameproductClick
to match UA standard
The fastest way to get started with Olo Serve and GTM is to import a container configuration from our Github repository. This will install the Olo Serve GTM templates and add the appropriate triggers, variables, and tags to track interactions with Serve via Google Analytics. The configurations are ideal for new or existing GTM setups. Additionally, they can be used to configure Serve App analytics for iOS and Android.
If you are worried about importing a configuration conflicting with your existing GTM setup, follow one of the manual setup instructions below.
To import a container configuration, open your GTM container and navigate to the Admin tab.
Select one of the JSON configuration downloaded from our Github repository that best suits your needs. In most cases, this will be olo-serve-container-configuration-ga4-web.json
as it leverages GA4 and only contains tracking for Serve web.
You can choose which workspace to import the configuration to, and whether or not to merge or overwrite existing tags.
Go through each Olo Serve Tag and replace G-000000
with your GA4 Measurement ID.
Once you have configured Google Analytics, preview your new GTM setup and inspect network traffic or the output of the Google Analytics Debugger Chrome plugin. For each trackable action (see Available Events) you should see corresponding data pushed to GTM and then GA.
If using the pre-built container configuration is not desireable for any reason, you can still take advantage of this template by setting it up manually.
To start using the Olo Serve GTM template, import it from the Community Template Gallery.
The Olo Serve Template is a custom tag that listens for changes in Serve, and then emits dataLayer
events that can be used as triggers in GTM.
You can configure the template to work with Google Analytics 4 analytics.
You can find the installed Olo Serve tag under "Custom".
After adding the tag, select which events you'll want forwarded to Google Analytics. This tag should be triggered on all DOM Ready events.
By selecting GA4, the dataLayer
events will match the GA4 Developer's Guide specifications.
Deprecated
Starting July 1, 2023, standard UA properties will stop processing data.
Deprecated
This only supports the transaction event and is only included for backwards compatibility.
If you want to track Serve web and Serve App events separately, you need to route data from GTM to more than one Google Analytics account. This is covered in more detail under Add Tags, but a prerequisite is to add variables to differentiate between platform. These variables key off device information exposed by Serve.
Before you add tags for sending data to GA, you need to add triggers that will be fired when an event is pushed to the dataLayer
from Serve. A full list of event names are available in the GA4 Developer's Guide specifications.
If you are using Serve App, you need to differentiate between data from the web and iOS/Android apps. To achieve this, you must define the conditions for when to fire a tag.
Adding Google Analytics tags and wiring them to triggers is the final step in taking data from Serve and sending it to Google Analytics.
You must define the event parameters as defined in the GA4 Developer's Guide specifications. Add a new variable to map from the dataLayer
to what GA4 is expecting.
For the full list of tag configurations, see each "Tag configuration for this example" section in the GA4 Developer's Guide specifications.
Event Name | Description |
---|---|
addToCart | A product is added to the cart. |
removeFromCart | A product is removed from the cart. |
checkout | A user proceeds to the Checkout page. |
purchase | A user has completed their purchase. |
productClick | A user clicks a product link. |
detail | A user views the details and/or configures a product. |
impressions | A product becomes visible on the screen. |
Serve App no longer supports Firebase. Here is a list of events previously tracked in Firebase and how to implement them in GTM.
Firebase Event | GTM Implementation |
---|---|
add_to_cart | Serve's addToCart event |
app_clear_data | Not Supported |
app_remove | Not Supported |
app_update | Not Supported |
BasketCreationError | Not Supported |
CardScan | Not Supported |
CreateBasket | Available as a Serve Global Event v1.createBasket † |
ecommerce_purchase | Serve's purchase event |
Favorite | Listen for clicks to the favorite button with GTM |
Feedback | Listen for clicks to the feedback button with GTM |
first_open | Available as a Serve Global Event v1.appFirstOpen † |
Location | Available as a Serve Global Event v1.locationAccessAllowed and v1.locationAccessDenied † |
LoginView | Listen for pageview changes with GTM |
MainMenu | Listen for clicks to the menu button with GTM |
os_update | Not Supported |
screen_view | Listen for pageview changes with GTM |
session_start | Not Supported |
User | Serve's userLogin event |
† Some events are not directly supported by these templates because there is no Google Analytics equivalent event. They can be manually integrated by leveraging the dataLayer, tags and triggers. Read more about how to integrate with these events in Olo Serve Global Data and Events.
If you use these templates for integrating tracking into Serve web today, the simplest path to adding support for Serve App is to remove all existing tags, triggers and templates related to older versions of these instructions and import one of the container configurations above.
If that is not an option, the best place to start is adding platform variables, filtering existing tags to only apply to Serve web, and then adding additional triggers and tags for each Serve App platform.