[GA4] Google AdSense Integration

When you link your AdSense account to a Google Analytics 4 property, your AdSense data from that account becomes available in GA4 reports and explorations. By combining AdSense data with other website metrics, such as traffic sources and user behavior, you can gain deeper insights and identify patterns that can help you to optimize your ad revenue.

When you link AdSense and Google Analytics 4, Analytics collects the following events automatically:

  • ad_click
  • ad_impression
  • ad_query

With the AdSense integration, Analytics collects each of these events for each ad on a page, which can cause an increase in the number of billable events for 360 properties.

With the collection of these events for each ad, Google Analytics 4 eliminates the discrepancies in reporting between Analytics and AdSense that were previously seen with the integration between Universal Analytics and AdSense.

In this article:

Prerequisites

Check that the following prerequisites have been met before setting up Google AdSense integration for GA4.

Permissions

To create or delete AdSense links in GA4, you must be an Admin in AdSense, and have the Editor role in Analytics.

Tags

Your GA4 web property must be configured to collect data using the Google tag.

Set up AdSense Integration for GA4

See the AdSense Help Center to learn how to Link your Google Analytics 4 property to AdSense.

Once you establish the link, it is listed in Analytics under Admin > Product links > Google AdSense Links.

How Google AdSense/GA4 reporting integration works

The GA4 integration with Google AdSense relies on several key processes, including shared IDs, automatically collected events, and data joining.

Shared IDs

For AdSense integration to work effectively, GA4 and AdSense tags communicate with each other using shared IDs to match each ad impression with its corresponding GA4 event. GA4 and AdSense use tags within each web page to generate a unique ID for each event or ad impression. In web properties this is called the query_id.

Inter-tag communication ensures that logged IDs are the same between GA4 and AdSense for a single event and its corresponding ad impression. Inter-tag communication takes place synchronously as events are sent and ads are served. IDs that are logged when AdSense and GA4 are not linked or when either system is unavailable will not be shared in this integration.

Automatically collected events

GA4 automatically collects a specific set of events via the Google tag. AdSense integration uses the ad_impression and ad_click events to populate data in GA4. The ad_query event is used for data joining. Learn more about Automatically collected events in GA4.

Data joining

GA4 joins its data with AdSense log files using the shared IDs to match AdSense data with Analytics data. This integration uses the information and configuration settings available when each individual event occurs. Making changes to tagging configurations or to page dimensions in GA4 won’t affect the data displayed in GA4 reporting for past data.

View Google AdSense data in GA4

Once you’ve set up the AdSense reporting integration, you’ll be able to see your AdSense data in GA4. Your AdSense revenue data will be available in the Monetization > Publisher ads reports and the Explorations main menu in your Google Analytics 4 property.

AdSense dimensions and metrics

After you link your AdSense account with your Google Analytics 4 property, Google AdSense traffic will be represented in the following dimensions and metrics in your Analytics reports.

Dimensions

  • Ad format (uses value of AdSense ad format dimension)
  • Ad source (uses AdSense publisher ID)
  • Ad unit (uses value of AdSense ad unit dimension)
  • Page path + query string and screen class (uses placement of AdSense ad units)

Metrics

  • Ad unit exposure (Amount of time a user is exposed to ads)
  • Publisher ad clicks (AdSense clicks)
  • Publisher ad impressions (AdSense impressions)
  • Total ad revenue (Sum of all advertising revenue, i.e., AdSense revenue + other ad revenue)

Data quality and discrepancies

If you see significant data discrepancies between the reports in your AdSense account and those in the AdSense section of Analytics, check to ensure that the Google tag is set up correctly on your website(s).

If the Google tag is set up correctly, and you still see data discrepancies in your AdSense and Analytics reports, they might be caused by one or more of the following:

  • iframes: AdSense uses an iframe to serve ads. Browsers that don't support the <iframe> tag don't report an impression in Analytics. This can result in Analytics counting more pageviews than AdSense counts impressions.
  • Security software or other blocking software: Software, such as firewalls and ad blockers, that can block content can also block AdSense impressions. Users with this type of blocking software may still be counted in Analytics, but AdSense impressions and data won't be counted in your Analytics reports.
  • New AdSense/Analytics integration: It can take up to 24 hours after you link your AdSense and Analytics accounts before data is collected. If you've recently configured your AdSense or Analytics code, or recently linked your accounts, allow 24 hours for data to appear in your reports. AdSense data that was collected before you linked your accounts will not appear in Analytics.
  • Timezone settings: If the timezones in your Analytics and AdSense accounts don't match, each product aggregates data into different time periods for the same displayed date in the reports. You can edit the property settings to change the timezone in Analytics.
  • Missing Analytics data: If any Analytics data isn't collected, for example if the tracking code didn't execute, the AdSense data associated with the missing Analytics data is not reported in Analytics.

Was this helpful?

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