Set up Google Analytics 4
Google Analytics 4 is an analytics partner integrated with Adjust. Our integration lets Google Analytics 4 receive data measured in Adjust through automated callbacks. Use this data with the partners' tools for analytics and insights.
In this article, learn how to set up measurement with Google Analytics 4 for your app. This includes activating the integration and choosing what data Adjust can share with Google Analytics 4.
Before you begin
Requirements
- Admin, Editor, or Custom Editor permissions in Adjust.
- Adjust SDK v4.0.0 and later to map SDK parameters to Google Analytics 4 parameters. Follow the guides linked below to use this feature.
iOS | Android | Windows | Unity | React Native | Flutter | Adobe Air | Cordova | Marmalade | Xamarin | Cocos2d-x | Titanium | Corona
Credentials
Firebase App ID, API Secret
- For help finding your credentials, contact your Google Analytics 4 representative.
In your Google Analytics 4 dashboard:
To get your Firebase App ID:
- Go to your Firebase Console
- Find your project and click on it
- Click on the gear icon > "Project settings" next to "Project Overview" on the left panel
- Under "Your apps", select your app and find the Firebase App ID under "App ID"
To get your API secret:
- Go to your Google Analytics dashboard
- Select Admin > Data collection and modification > Data streams
- Select the data stream of your app, and find your API secret under Measurement Protocol API secrets > Secret value
- If there's no existing API secret, under Measurement Protocol API secrets select Create, enter a name and select Create
Select Google Analytics 4 and your app in Campaign Lab
- Under Campaign Lab, select Partners.
- Select New partner > Google Analytics 4. Select Next to move to the next screen.
- In the App selection screen, choose the app for which you want to create the link, and enable the integration to share data with Google Analytics 4.
- Select Next.
Enable data sharing
Enable data sharing to activate the integration with Google Analytics 4. To enable data sharing:
- Enter your Firebase App ID, API Secret.
Once you enable data sharing with Google Analytics 4, Adjust automatically sends Google Analytics 4 the following data, by default:
- install
- reattribution
Set your data sharing options
If you’re working with a multi-platform app with data sharing enabled for multiple platforms, you can:
- Separate data sharing options at the platform-level by selecting Use platform-specific settings.
- Set the same data sharing settings for multiple platforms by selecting Use global settings.
Now, under What will be shared by default?, review the activities that Adjust shares with Google Analytics 4 by default:
- install
- reattribution
Send additional data
Choose the amount and type of data that you want to share with Google Analytics 4 through callbacks. Google Analytics 4 may use this information to optimize performance.
To send additional data, you can review and customize the following:
Enable Google Analytics 4 for your app
In the Setup review screen, you can review your choices. You can also go back and make changes to:
- Your selected app
- Data sharing options
Select Enable partner to enable Google Analytics 4 for your app. Analytics partners don't work with links for campaigns. Once enabled, our integration sends attribution and in-app event data via automated callbacks.
Partner specific setup instructions
Our Google Analytics 4 integration allows Adjust to send cross-network attribution data to Google Analytics. You should enable the integration if you are already logging conversions with the Google Analytics for Firebase SDK. Adjust leverages the campaign_details event in the Measurement Protocol API to send conversions along with attribution details.
This integration requires the Firebase SDK to be integrated into your app and session partner parameters to be implemented within the Adjust SDK. This is required because Google Analytics 4 creates an app_instance_id for every instance of an install of an app containing the Firebase SDK. If app_instance_id is not tracked and passed accordingly, Adjust will not fire callbacks to Google Analytics.
Follow the guides linked below to use this feature:
iOS / Android / Unity / Flutter / React Native
Session partner parameters allow the Adjust SDK to track Google Analytics 4’s app_instance_id and include it when sending data to Google Analytics 4. You should set app_instance_id before initializing the Adjust SDK.
Note : Organic traffic is not shared via this integration. Due to differences on the attribution methodology, Google Analytics does not accept conversions older than 3 days. Depending on the attribution windows configured for your Links, you might see discrepancies as some conversions might not be reported on Google Analytics 4.
List of all parameters forwarded to Google Analytics 4
Google Analytics 4 requires Adjust to send the following parameters (data points) with your callbacks:
Placeholder | Information |
{adgroup_name} | Adgroup name, as taken from the tracker |
{campaign_name} | Campaign name, as taken from the tracker |
{creative_name} | Creative name, as taken from the tracker |
{engagement_time} | Engagement timestamp |
{network_name} | Network name, as taken from the tracker |