Set up (web)

Verify your web-tracking setup

It can take up to 24 hours for all data to appear in your Google Analytics account after you've installed the tracking code. In the meantime, here's how to confirm that you've set up tracking correctly:

  1. Read the Tracking Status Information section at the top of the Tracking Code section
    To get to that page, click Admin. Click the Tracking Code.

    Status messages for tracking include:

    • Waiting for Data
      The tracking code has been detected on the homepage of your website, and Google Analytics is aggregating the data to populate into your reports.
    • Tracking Not Installed or Not Verified
      The tracking code has not been detected on the homepage of your website, so use the recommendations in this section to verify your setup.
    • Tracking Installed
      The tracking code is working properly and data is being populated into your reports.
  2. Check your reports for data

    From the website view that corresponds to your site, select My Site and Reports. In this report, you change the default display date to the current day. To do this, click the date widget on the dashboard and change the date to the day that you set up the tracking code. If you do this just a few hours after setting up the tracking code, then you probably won't see much data. However, if you see some site usage statistics, then this means that your Analytics view is receiving data for your website and that tracking is working.

  3. Use your WYSIWYG editor correctly

    If you use a WYSIWYG ("What you see is what you get") editor such as Macromedia Dreamweaver, make sure that you're not pasting the code using the Design mode of the editor – this is probably the case if you can see the tracking code in the browser when viewing your pages. Make sure that you use the &;code&; view mode (HTML markup) or the equivalent when you're pasting the code to your web pages.

  4. Use your browser's "View Page Source" feature to find the tracking code

    Navigate to your page on the web and select View Source from your browser's menu. For more details, see Checking Source Code for Analytics.

    Asynchronous Code (default)
    The asynchronous snippet should appear at the top of your page before the closing </head> tag.
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-XXXXX-X']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    Traditional Snippet
    The traditional snippet should appear at the bottom of your page just before the closing tag.
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
    <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-xxxxxx-x");
    } catch(err) {}
You should see your own account number in place of the xxxx-x in the example above. If you need a fresh copy of your code, click Edit next to the appropriate view on the "Analytics Settings" page, then select Check Status.