Batch allows you to track Google Analytics users who interact with your push notifications or In-App messages. This is helpful to understand what your users do in your app/website, tracking transactions and e-commerce conversions.
A. Tracking Web Push Notifications
You can easily track your web push opens in Google Analytics by following these two steps:
1. Adding UTM Tags to Your Deeplink
The first thing you need to do is to add UTM tags to the deeplink of your push campaign. This can be done from the campaign editor or when calling the Campaigns / Transactional API:
Each UTM tag includes two main elements:
A parameter (e.g: utm_source)
A value (eg: newsletter)
There are several parameters you can use (more information here):
Campaign Name (utm_campaign): This can be the name (e.g. salejuly) or the category of your push campaign (e.g. onboarding).
Campaign Source (utm_source): This parameter allows you to define where your content comes from (e.g. Batch_Android, Batch_iOS)
Campaign Medium (utm_medium): This parameter allows you to identify the medium used by the user is coming from (e.g. push)
You can build easily add UTM tags to your deeplink by using Google's Campaign URL Builder:
B. Tracking Mobile Push and In-App Campaigns
This section assumes you are already using the V3 of Google Analytics' SDK in your app. Also, you must have a deeplink architecture integrated into your application.
The Google Analytics SDK has been sunsetted since October 2019 for non-Google Analytics 360 customers, meaning if you still use it on a free Google Analytics account, no data will be available and you must migrate to Firebase.
1. Installing the Google Analytics Dispatcher in Your Application
The Google Analytics dispatcher uses the UTM tags (like on lots of Google services) from your campaign to dispatch a new set of data on Google Analytics.
Once the dispatcher is installed, you will be able to track different types of events related to your push or In-App messaging campaigns on Google Analytics.
Note: If you use an SDK version that is older than 1.15 or has already released your apps without installing the Google Analytics event dispatcher, you can still track push opens by adding UTM tags to your deeplinks as described in section A of this article.
2.a. Tracking a push campaign with a UTM tag
The dispatcher gathers the values of utm_campaign, utm_source and utm_medium from the deeplink URL and from the custom payload of your campaign.
The tags utm_source and utm_medium are optional because they have a default value of batch and push accordingly.
You can add utm_content only in the deeplink URL in case your push notification has several different buttons.
2.b. Tracking an In-App Campaign or Mobile Landing
The dispatcher gathers the value of utm_campaign from the field Tracking ID of your campaign.
You can't customize the utm_source and utm_medium tags, they have a default value of batch and in-app accordingly.
You can add utm_content only in the deeplink URL in case your in-app message has two different buttons.
C. Filtering Your Audience Based on UTM Tags
Once the steps described in either sections A or B are completed. You will be able to track users coming from specific sources, mediums or campaigns by going to Acquisition > Sources > all on Google Analytics.
Then you will be able to see your whole campaign from push notifications by clicking on the campaign tab.
D. Testing Your Campaign Tracking
In order to test whether your Batch campaign data is correctly being tracked, you can go to the "Real Time" tab in Google Analytics and check the event count for the event that you want to track.
You can then try to send yourself a test push (iOS / Android) or In-App message. If integrated correctly, you should see the event count increase a few moments after the event is performed (Push open, Push notification dismiss, In-App dismiss, In-App display, etc).
This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.