CPC data not collected
To see Google Ads campaign information for a given ad in your Analytics reports, your Analytics web property must be linked to the Google Ads account that owns the ad. If you see "(not set)" in Analytics reports that use Google Ads data, that means that Analytics wasn’t able to join the Google Ads ad information with the Analytics session information.
Analytics can be missing Google Ads ad information for a few different reasons. However, do note that click info can occasionally be lost even if you have everything setup right. It’s very normal to have a small percentage of "(not set)" values. For example, if someone copied one of your ad URLs and posted it on social media, the gclid would expire and users that click the link would be attributed to a "(not set)" campaign.
In order for Analytics to be able to retrieve Google Ads ad information, Analytics must be linked to Google Ads. Linking a Google Ads account to an Analytics view requires two steps:
- The Analytics web property must be linked to the Google Ads account that owns the ad
- The Google Ads data must be made available on the Analytics view whose reports you are viewing
For CPC data to be associated with a Google Ads click, the landing page must be tracked with the Analytics tracking code. If the landing page is not tracked, the Google Ads click information is lost and the Analytics session can't be attributed to the click.
If you have a landing page redirect to another page on your site and you also want to track the page that performs the redirect, you must also ensure that the Analytics tracking code on your landing page has time to execute before the redirect occurs. You may need to add a delay to the redirect, so that campaign parameters can be recorded.
Alternatively, you can pass the parameters in the URL to the redirect's target page. When the Analytics tracking code on the target page reads the parameters in the URL, it will associate the session with the proper campaign information.
When a Google Ads account is using auto-tagging, Google Ads will append a click ID parameter to ad destination URLs. Analytics uses this parameter to retrieve attribution information from Google Ads. This parameter is called a GCLID.
How the GCLID gets dropped
If a Google Ads ad destination URL redirects to a second URL, then the redirect must transfer the GCLID to the second URL. If the redirect doesn't transfer the GCLID, Analytics can't tell that the session came from a Google Ads click.
If your ad destination URLs redirect to secondary destinations, make sure that your ad destination logic properly transfers Analytics-related campaign parameters to their secondary destinations.
Third-party redirect example
Let's say you own
advertiser.com, and have your ads direct to a third-party site that redirects to your landing page.
- A user clicks a Google Ads ad which sends them to
www.example.com?gclid=XDFredirects the browser to
www.advertiser.com/product.html, forgetting the GCLID parameter.
- When the user arrives on your site, the GCLID is not present. As a result, Analytics can't tell that he came from a Google Ads ad.
Mobile site example
Let's say you own the desktop site
advertiser.com, and you also have a mobile subdomain on your site at
mobile.advertiser.com. You have ads that direct to your desktop site. Your desktop site redirects to your mobile site if the user has a mobile browser.
- A user with a mobile browser clicks an ad which directs them to
www.advertiser.com?gclid=XDFnotices that the user is using a mobile browser and redirects them to
mobile.advertiser.com, forgetting the GCLID parameter.
- When the user arrives on your mobile site, the GCLID is not present. As a result, Analytics can't tell that he came from a Google ad.
This situation can also occur with manually-applied campaign information parameters, such as
www.example.com?utm_source=google&utm_medium=cpc. Make sure that your redirects propagate the manual tagging parameters if you use them.
How to know if the GCLID is getting dropped
You can test if the GCLID parameter gets lost on your site due to a redirect by doing the following:
- Copy the destination URL of your ad
- Paste this into your browser's URL bar and add a test parameter at the end:
- Press Enter
- Examine the URL of the resulting page.
If you don't see this test parameter in your browser's URL bar any more, it was lost due to the redirect.
Note that the GCLID parameter is proceeded by a
? when it's the first or only parameter. Append the GCLID to the URL with an
& when there are more parameters.
If you aren’t using Google Ads autotagging and are instead manually-tagging your Google Ads ad destination URLs, make sure that they’re fully-tagged.