Confirm auto-tagging works for your site

Use the Chrome Developer Tools and follow the instructions here to check if auto-tagging works on your site before setting it up.

If you don't see the gclid parameter appended to your URLs after the page is fully loaded, then it's likely that your website isn't configured to handle query parameters in a way that lets auto-tagging work.

Open a new tab in Chrome. Open the Chrome menu, then click Tools > Developer Tools to open the Chrome Developer Tools. Click the Network tab. This pane shows the network (HTTP) requests for the page being loaded and must be opened before the page is loaded.

Copy your AdWords final URL. Paste it into the Chrome address bar, but don't load the page yet. In the address bar, append a test AdWords auto-tagging query parameter, like gclid=TeSter-123. This makes the full URL: http://www.example.com/?gclid=TeSter-123.

If your final URL already contains a question mark (?) followed by a query parameter, prefix the gclid parameter with a '&' symbol. For example: http://www.example.com/?parameter=1&gclid=TeSter-123.

If your final URL contains a hash '#' symbol, append the gclid parameter before the hash. For example: http://www.example.com/?parameter=1&gclid=TeSter-123#bookmark.

Load the URL and watch the network requests load.

Refer to the Troubleshooting section below to help find a solution.

Troubleshooting

URL redirects

Turn on Record in the Chrome Developer Tools (black circle on the bottom bar in the Network tab). Enter the original final URL with the test gclid appended into the address bar. Press Enter to load the URL.

Under the Networks tab and Headers pane on the right, click some of the first requests listed--they will generally not be type-specific requests (no image or code file extensions).

Inside the request, look for an HTTP status code of 301 or 302. These codes indicate a redirect.

Under the Response Headers section, look for the Location value, which indicates where the browser has been redirected. (Note that redirects can consist of multiple legs, so you might have to check several page HTTP requests to find out where the gclid is lost).

If the new URL doesn't have the auto-tagging parameter and the value you specified earlier, then it's likely that Analytics has not been able to store the gclid value.

In some cases, you might not see gclid parameter in the final landing page URL but the Analytics code from the previous page might still have sent it in the redirect process (this usually happens too quickly to observe by eye). To check if the gclid was sent by the Analytics code on a previous page, look at the collect request made by the page. Use the filter icon to help sort or search for collect requests.

In Chrome Developer Tools, under the Networks tab, click on the collect request in the left pane.

In the Headers pane on the right, under the Query String Parameters section, look for the dl parameter in the collect request.

You should seegclid=TeSter-123. If you don't see this value, then the gclid parameter was not successfully parsed and stored by Analytics.

To resolve an issue where the Analytics auto-tagging parameter is being removed by a redirect, you can:

Try updating your AdWords destination URL to the final URL. For example, if your Destination URL is www.example.com/redirect-page but this page actually redirects to www.example.com/new-url, then use the latter URL for your ad destination URL.

If the redirect is caused by a server-side rule, try reconfiguring your server settings to stop the redirect. Every web server is different, so methods will vary. For example, Apache servers rely on a .htaccess file to configure redirect rules. If you can't stop the redirect, configure your server to allow redirects to carry query parameters (like the gclid) from the initial URL to the final URL. For example, the final URL with auto-tagging is: www.example.com/redirecting-page?gclid=TeSter-123, when the redirect occurs it should forward the user to www.example.com/new-url?gclid=TeSter-123 (note here that the gclid parameter remains the same, although the page URL changes).

Tracking code errors

The Analytics tracking code snippet could be causing an issue if it isn't set up correctly on the page. Using the Chrome Developers Tool, look for the collect request in the Network requests tab. If the collect request isn't loading on the page, the Analytics tracking code snippet isn't set up correctly.

Content frames

You can use Analytics inside an HTML frame like an <iframe>. Because child frames can't read their parent frame address URL, the Analytics tracking code embedded in an iframe can't see the auto-tagging (gclid) value even if it's visible in the browser address bar of the page you're looking at.

To resolve this issue, make sure Analytics is installed on the parent page. For more information, visit the Developer Guide on how to set up cross domain tracking across iFrames.

URL case conversion

If the auto-tagging gclid value case is being altered by a URL rewrite engine on your server (like if gclid=TeSter is being changed to all lower cases gclid=tester), Analytics can't determine which the AdWords click is associated with the session. If any gclid parameter exists, the data is identified as as coming from source=google and medium=cpc, but all other click-specific data such (like campaign, adgroup, keyword etc.) appears as (not set) in Analytics reports.

To resolve this issue, configure your web server to allow all non-reserved URL characters, including uppercase characters and symbols like '-' (hyphen) and '_' (underscore), since these may be utilized by AdWords in generating a unique gclid parameter for a click.

Length of gclid parameter

The gclid value can be up to 100 characters long. Make sure your log, storage, and redirecting systems can handle gclid parameters of this size. To confirm your website will not truncate long gclid parameters, repeat the troubleshooting steps above using this value: gclid=TeSter-123-ABCDEFGHIJKLMNOPQRSTUVWXYZ-abcdefghijklmnopqrstuvwxyz-0123456789-AaBbCcDdEeFfGgHhIiJjKkLl.

If the examples in this article don't offer you a solution, consider using custom campaign tracking instead of AdWords auto-tagging.