When setting up measurement for a Google Analytics 4 property, key events attribution for apps is defined based on the selected reporting attribution model. GA4 uses identifiers in order to connect app events and key events.
Apps are unique in that there is a specific action required in order for engagement to happen – an app install. App installs are tracked in GA4 as first_opens. This is because the Google Analytics for Firebase SDK does not run until the app is opened.
GA4 provides several methods for attributing app installs: auto-tagging, universal links (iOS), Android app links, Play Store Referral API (Android), and Apple Search Ads installs.
Auto-tagging
For Google Ads campaigns, you can leverage auto-tagging, which enables GA4 to identify which app or website clicks are leading users to your app. When auto-tagging is enabled a unique parameter is added to the web or app link that directs users to download the app. When a user clicks the link, installs and opens the app, Google Analytics will report the source, medium and campaign from this ad event.
Note: Auto-tagging is not supported for iOS app installs.
Universal links and Android app links
You can use universal links (iOS) or Android app links to track app installs by creating deep links that direct users to download your app from the app store. You can configure manual or static tags to include utm parameters (utm_source, utm_medium, utm_campaign), and see the related campaign information in your Analytics reports.
Universal link example:
http://my.app.link?utm_campaign=myappcampaign&utm_source=foo&utm_medium=bar
Android app link example:
http://example.com/gizmos?utm_campaign=myappcampaign&utm_source=foo&utm_medium=bar
When a user clicks the link, Analytics logs a campaign event with those parameters, and you see the following data for campaign-related events:
- Campaign: myappcampaign
- Source: foo
- Medium: bar
Play Store install referrals
Install referrals from Google Play Store appear as follows:
- Source = google-play: indicates one of two things:
- The user was deep linked to the Play Store app listing via a link that specified a referrer (e.g., play.google.com/store/apps/details?id=com.foo.bar&referrer=R)
- The user searched Play Store and discovered the app organically
- Source = (direct): indicates:
- The user was deep linked to Play Store via a link that didn't specify a referrer
Apple Search Ad installs
If an app is installed as the result of a click on an Apple Search Ad, Analytics logs a firebase_campaign event with those parameters, and you see the following data for campaign-related events:
- Source = Apple
- Medium = search
- Term = <keywordId from AdServices>
You must add the AdServices framework to the Xcode project file for your app to track Apple Search Ads.
Manually attribute first installs
To manually capture the source, medium, and campaign of a user's first app install, you need to send the campaign_details event shortly after the install. When a user installs your app for the first time, the first_open event will attribute the install to the campaign information specified in the campaign_details event.