Advertising and attribution

[GA4] Send SKAdNetwork postbacks to Google Analytics

The following article takes you through the steps to send SKAdNetwork postbacks to Google Analytics using Measurement Protocol.

Step 1: Register SKAdNetwork postbacks for the relevant iOS versions

Visit Apple's documentation for more information. For customers using the Google Analytics for Firebase SDK, the SDK registers this automatically on the app's behalf and you can skip this step.

Step 2: Ensure you are receiving and decoding SKAdNetwork postbacks

Visit Apple's documentation for more information. If you have not set up a SKAdNetwork endpoint, you'll need to do so by following Apple's documentation. 

Note: Google Analytics 4 can't currently be configured as an endpoint.

If you've already set up an endpoint with a Google-approved App Attribution Partner (AAP) or an in-house solution, you can skip to step 3 which walks you through the process of directing results to Google Analytics using Measurement Protocol.

Step 3: Direct postback results to Google Analytics using Measurement Protocol

This is done by sending a custom campaign_details event to Google Analytics through Measurement Protocol using the following schema (codelab example). 

Google Analytics 4 SKAdNetwork Measurement Protocol implementation

All parameters are required unless specified as optional.

Request level parameters

Parameter More information
firebase_app_id: {gmp_app_id}
  • In Google Analytics 4, navigate to Admin > Data Streams > choose your stream > Firebase App ID.

  • Set outside of payload.

api_secret: {api_secret}
  • To create a new secret, navigate to Admin > Data Streams > choose your stream > Measurement Protocol > Create in Google Analytics 4.

  • Set outside of payload.

timestamp_micros: {timestamp of received SKAN postback} 
  • Optional but if provided, must be within the last 72 hours. If not provided, will use collection timestamp.

  • key events window in Google Analytics 4 for acquisition events is 30 days. It is important to send your postbacks as soon as possible for more accurate reporting.

app_instance_id: {...}

Required. Generate a unique string of random numbers. This specific ID string will be discarded for an actual app instance IDs once this data is used in conversion modeling.



 

GA Event

Event More information 
campaign_details Custom event.

GA parameters (existing)

Parameter More information
source: {source}

These are parameters that are used in manual tagging. Google Analytics 4 reporting is structured using the Google Analytics 4 Default Channel Groupings. We suggest using these as a guide to categorize each parameter. Send these parameters for all non-Google postbacks.

For example:

Facebook postback:

  • source: facebook
  • medium: cpc|cpm
  • content: ad_version_name
  • campaign: Facebook Spring 22 Campaign 
  • campaign id: as is from SKAN postback

For Google postbacks, we will decode campaigns based on your property's integration with Google Ads. Therefore, the above parameters are optional for Google postbacks. You must ensure that your Google Analytics 4 property is linked to your Google Ads advertising accounts. 

Note: It’s important to send all your SKAdNetwork postbacks, not just the non-Google ones, to Google Analytics 4.
medium: {medium}
term: {term}  Optional
content: {content}  Optional
campaign_id: {campaign_id} Value from SKAdNetwork postback.
campaign: {campaign}  optional but without it, will show as (not set)

For Google Ads campaigns, we will decode the ID and provide the campaign name based on your Google Analytics and Google Ads link and update the source and medium parameters. If your accounts are not linked, we will not decode Google campaign IDs and will use the specified source and medium parameters.

For non-Google Ads campaigns you can decode and provide campaign names. If you don’t know it, you can copy your SKAdNetwork campaign_id.

Note: If not provided, it will surface as (not set).

source_platform: “apple_skan” Important: You must specify this string exactly, respecting capitalization and _.
app_id: {app_id}

Value from SKAdNetwork postback. This would be your app bundle id.

transaction_id: {transaction_id} Value from SKAdNetwork postback.

Required new parameters

Note: These new parameters can be set up in the Google Analytics 4 user interface; however, it is not required. If you would like to see specific custom dimension reporting based on these parameters, then they will need to be registered in Google Analytics 4.

Parameter More information
version: {version} Value from SKAdNetwork postback
conversion_value: {conversion_value} Value from SKAdNetwork postback
fidelity_type: {fidelity_type} Value from SKAdNetwork postback.
attribution_signature: {attribution_signature}

Value from SKAdNetwork postback.

Note: This is a security feature. SKAdNetwork postbacks are cryptographically signed.

redownload: {redownload} Value from SKAdNetwork postback.
source_app_id: {source_app_id}

Value from SKAdNetwork postback.

Note: This is the ID of the app where the ad was clicked that led to the install.

did_win: {did_win}

Value from SKAdNetwork postback.

Note: Advertisers only receive winning postbacks. Where AdTechs will receive their winning postbacks and runner-up/assists postbacks. 

 

ad_network_id: {ad_network_id}

Where {ad_network_id} represents the value in the postback.

Value from SKAdNetwork postback.

This shows the ad network that surfaced your ad. This will be useful information for the “source” traffic dimension as well.

 

Step 4: Verify that Marketing Platform hits are being received

The campaign_details events are not directly shown in Google Analytics. Instead, SKAdNetwork postbacks are turned into events and integrated into first_open key events and event reporting. They can be segmented out by adding the dimension source platform (source platform = SKAN).

If you want to confirm that hits are being sent we recommend that you log test events by duplicating the campaign_details events using a different event name (i.e., campaign_details_skan_test). You can then verify that the test events appear in the Google Analytics 4 Realtime report. If you register the test event and parameters, they will show up in ad hoc reporting in addition to realtime.

Notes:
  • If you want all of your SKAdNetwork postbacks to show in reporting, in addition to sending each as a campaign.details event, you must register the duplicate event and parameters as mentioned above. If you opt to do this, SKAdNetwork postbacks must still be sent using the campaign.details event. Otherwise Google Analytics won’t recognize them and won’t be able to perform conversion modeling to improve your iOS first_open reporting. 
  • SKAdNetwork postbacks need to sent within 4 days of receiving them in order for Google Analytics to leverage them in conversion modeling and reporting.

Learn more about general verification steps.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
12724390355132326733
true
Search Help Center
true
true
true
true
true
69256
false
false