CPC data not collected

One of the most common problems people encounter with their redirects is that CPC data is not recorded properly. A typical situation is as follows:

(The gclid parameter was added automatically by Google AdWords' auto-tagging to track campaign, medium, and keyword data in Analytics. This situation also applies to manually-applied campaign information tags, such as www.example.com?utm_source=google&utm_medium=cpc.)

  • A user clicks an AdWords ad which sends them to www.example.com?gclid=XDF
  • www.example.com?gclid=XDF redirects the browser to www.advertiser.com/product.htm, dropping the gclid parameter.

For CPC data to be associated with the click, the landing page (www.example.com in the example above) must be tracked with the Google Analytics tracking code. You must also ensure that the Analytics tracking code on that 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 (www.advertiser.com/product.htm in the example above). 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.

You can test if the gclid parameter gets lost on your site due to a redirect. Simply copy the destination URL of your ad into your browser and add the following test parameter to it:


Press enter. If you don't see this test parameter in your browser 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.

Learn more about determining whether auto-tagging will work for your site.

Was this article helpful?