About click IDs
To track specific clicks an ad, AdWords or DoubleClick Search (DS) can generate a case-sensitive ID. Generating a click ID is required for some links between Google products (such as DS and Google Analytics), and you can use the ID to attribute offline conversions to specific site visits.
Generating a click ID
If you enable auto-tagging in AdWords, AdWords generates a click ID when your ad is shown. As a result, if a user clicks on a particular ad impression multiple times, those clicks will be associated with only one GCLID. Landing page visits for the exact same impression will share the same click ID.
DS can generate a click ID if you enable Google Analytics support or enable the conversion API service. If a click is redirected from AdWords and AdWords has already generated a click ID, DS uses the AdWords ID instead of generating a new one. If a click is redirected from another type of supported engine, DS generates the ID.
Sending the click ID to your site
Regardless of which system generates a click ID, DS appends two URL parameters to landing page URLs before redirecting to your site:
gclid: contains the click ID
gclsrc: indicates which system, DS or AdWords, generated the click ID.
Only DS generates and appends the gclsrc parameter. (You won't see this parameter in AdWords accounts that are not managed by DS.) The value of the gclsrc parameter will be one of the following:
gclsrc=ds: the click ID was generated by DS. In addition, the click was either on an engine other than Google, or the click was on Google but the AdWords account is not using auto-tagging.
gclsrc=aw.ds: the click ID was generated by an AdWords account that is using auto-tagging.
gclsrc are reserved parameter names: DS uses them and does not de-duplicate if you also use them.
If you want the click ID and click source to be available in additional parameters with names other than
gclsrc, use the [*GCLID*] and [*GCLSRC*] macros.
Parallel tracking and Google click IDs
AdWords parallel tracking sends customers directly from your ad to your final URL while click measurement happens in the background (without sending customers to the tracking URLs first). If you turn on parallel tracking for an AdWords engine account, DS can't send the
gclsrc parameters to your landing pages.
If your landing pages only need the
gclid parameter, enable auto-tagging in AdWords. Auto-tagging adds
gclid when an ad is clicked, so the
gclid parameter will be available to the landing page, even if you use parallel tracking.
If your landing pages need the
gclsrc parameter, turn off parallel tracking. This parameter is available only when the DS Conversion API is enabled and clicks redirect through DS.
Testing click IDs from AdWords
If you test your tracking template in AdWords, the best practice is to click on a live ad that has been served in Google search results. If you click the Test button in AdWords, there is no guarantee that the landing page URL will have a click ID.