Tracking ad impressions and clicks with Google Analytics

The Advanced Ads Tracking add-on allows tracking impressions and clicks with Google Analytics. It supports both the “old” Universal Analytics (UA) and the new Google Analytics 4.

Tracking ads with Google Analytics allows you to combine this data with other metrics to optimize your ads.

It also takes the pressure of tracking, especially impression tracking, in your local database from your server and saves performance.

Activate the ad tracking for Google Analytics

To use ad tracking with Google Analytics, go to Advanced Ads > Settings > Tracking and set the tracking method to Google Analytics.

Then, enter your tracking ID. The ID structure differs depending on whether you use Google Analytics 4 or Google Analytics (UA) for tracking.

Tracking settings of Advanced Ads
Choosing Google Analytics as the tracking method

If you want to combine the benefits of local tracking methods with those from Google Analytics, you can also enable Google Analytics tracking additionally.

  1. Switch to that local method and save the settings
  2. Add the following line to your wp-config.php
define( 'ADVANCED_ADS_TRACKING_FORCE_ANALYTICS', true );
Code language: JavaScript (javascript)
  1. Reload the Tracking settings page
  2. Enter your Google Analytics publisher ID in the appropriate field and save the settings

If you have set up the tracking with Google Analytics as an additional method and want to disable it again, please do not forget to remove this entry from your wp-config.php.

Analyze ad impressions and clicks in Universal Analytics

To analyze impressions or clicks in Google Analytics, switch to your account and go to Behavior > Events > Top Events. As soon as Google Analytics tracks ad impressions or clicks, you should see Advanced Ads in the Event Category list.

Now, click on Advanced Ads. You will see the number of all impressions and clicks in the given period on the following view in the Event Action column.

If your website runs in another language, it might be a translation of the words impressions and clicks that you can see on this screenshot.

Ad Tracking in Google Analytics (UA)
Impressions and clicks overview in Google Analytics (UA)

After you click on either impressions or clicks, you will get a list sorted by your ad units in the Event Label column. 

Clicking on a specific ad unit leads you to the report for this particular ad in the given period. You can use the Secondary Dimension to group this data with other information to learn more about these events. 

In this way, you can determine, for example, the landing pages of those visitors who ended up clicking on your ads.

Furthermore, you can combine impressions and click events with numerous other data, e.g., the page on which visitors made these clicks, the traffic source, the device, the geolocation, etc.

Google Analytics clicks matched with Landing Page
Analyzing clicks based on the Landing Page of the visitors

Testing Analytics tracking

To test if your tracking implementation works, go to Real-Time > Events and the Events (Last 30 min) tab after performing some activity on your page. Impressions and maybe clicks should appear here.

Real-time events in Google Analytics (UA)
Checking the Real-Time tracking events in Google Analytics (UA)

If you just switched on tracking with Analytics, it may take up to 24 hours before impressions and clicks are also showing in Behavior > Events > Overview.

Resources for ad tracking with Google Analytics (UA)

Analyze ad impressions and clicks in Google Analytics 4

To retrieve the ad tracking results in Google Analytics 4, you need to create a custom dimension at first.

This dimension is required for these numbers to show up in your reports. Without this dimension, you won’t see any data from Advanced Ads in your reports.

Create a custom dimension

Open your Google Analytics dashboard and navigate to Configure > Custom definitions > Create custom dimensions.

Fill in the following information:

  • Dimension name: Advanced Ads (customizable)
  • Description: Advanced Ads event label (customizable)
  • Scope: Event (important)
  • User Property/Parameter: event_label (important)
Custom dimension in Google Analytics 4
Creating a custom dimension in a Google Analytics 4 property

Event reports

Afterward, you can find the clicks and impressions of your ads in Google Analytics 4. Google stores them as events in different places in the reports.

One day after adding this custom dimension, Google Analytics automatically adds an “Advanced Ads” widget to the detailed Impressions and Clicks event reports.

You can find this data under Engagement > Events and read the ad-specific results there. But as I said, it takes until the next day to see anything there.

Advanced Ads in Google Analytics 4 event reports
One day after creating the custom dimension, you can find detailed Impressions and Clicks event reports.

Don’t be confused that if you add the dimension and choose it in the reports, you will see only the result “(not set)” in the related column. The tracking of the ad unit names will start after creating the custom dimension.

So you cannot see this data earlier. Also, reconstructing old data before making the Custom Dimension is not possible.

Combine clicks and impressions with other data

To analyze the ad performance of different posts and pages, you can find the corresponding data in the Engagement > Page and screens report.

Combine Page and screens data with ad tracking metrics in Google Analytics 4
Use the page and screens report to analyze the site-specific ad performance

You can select Impressions under “Event count” in the corresponding table.

Then, choose the clicks in the conversions column next to it. In this view, Google Analytics shows the data for all ads summarized and not ad-specific.

You can also display the number of impressions and clicks in other reports like User Acquisition, Traffic Acquisition, Demographic Details, and Tech Details.

Combine ad tracking events with traffic, acquisition, or tech details reports
You can choose the ad tracking events in the different reports of Google Analytics 4

Detailed click analysis

If you open the report in Engagement > Conversions, you can find the tracked clicks there.

You can now group this data with other metrics. For example, you can choose user-related data such as geolocation, device, browser, or language.

But you can also merge website-related information, e.g., group clicks with the landing page or the page from which a user made the click.

Conversion analysis in Google Analytics 4
Find more information about ad clicks in the Conversion report

Instead of the Page path and screen report, you can also display the names of your ad units in this view.

Choose Custom (Event-scoped) > Advanced Ads from the popup selection.

Choosing a custom dimension in the Conversion report
Choose your custom dimension to see the ad unit titles

Analytics quotas and limits

Google Analytics limits the number of events like ad impressions and clicks you can send to them.

You should check the hits and limits on your website using this tool before switching to the Analytics method and then regularly while using it. This public Data Studio report is dedicated to Universal Analytics (UA) properties.

You can find the current limits on this page and shortlisted below:

  • The limit for hits per page load is 20. Every second, this limit increases by 2. Hits include page impressions, ad impressions, ad clicks, and other custom events. Google Analytics does not count hits related to e-commerce here.
  • There is an overall limit of 500 hits per session. The hits that exceed this limit will not be processed.
  • The monthly hit limit is 10 million per property. Tip: You could create a new property to track ad impressions only.

What else do you need to know about ad tracking with Google Analytics?

If you choose Google Analytics as the tracking method, the local tracking methods are disabled. That’s why some features of local tracking methods are not available in this case.

These limitations include email reports with statistics, click and impressions limits, the option to spread impressions out evenly over a given period, and finally, the opportunity to track clicks and impressions on external pages or newsletters.

The ad tracking only works on pages that contain the Analytics code. E.g., it would not work if you integrated the ad code in a newsletter or on other websites delivered with the ad server placement.

Make it better

Increase your ad management skills without spending more time.
Join over 150,000 publishers and AdOpts increasing their ad revenue.