Add the Google Tag Assistant Extension to Chrome to Check Google Analytics Installation on Any Web Page

Google Tag Assistant panelview at full size

The Google Tag Assistant panel indicates the presence of Google Analytics on a Web page.

The Google Tag Assistant extension for Chrome allows you to check for the presence of several different types of Google code snippets, or “tags”, on a Web page.

After the free and easy install, you can click the tag icon in the Chrome extension bar to display information about the Google Analytics code on the page, including the UA number, which identifies the Google Analytics property to which all raw website data is sent. It also offers suggestions, such as placing the Google Analytics tracking code within the tags (which is recommended but not completely necessary for Google Analytics to execute correctly).

Interestingly, Google Tag Assistant also displays the container ID of Google Tag Manager container if this code is also present and indicates the UA number of any Google Analytics tags that you have deployed to the page through Google Tag Manager. (Remember not to confuse Google Tag Assistant with Google Tag Manager.)

One issue that Google Tag Assistant sometimes calls out is the occurrence of multiple Google Analytics UA numbers on a single Web page. It may be perfectly valid to have two different tracking codes with two UA numbers on a single page (for rollup reporting), but multiple tracking codes sometimes indicate a need for tighter management of the Google Analytics deployment.

Keep in mind that you do not need to be logged into Google Analytics or Google Tag Manager to use Google Tag Assistant, and that you can activate it to display Google tag information for any page on any website, not just your own.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Main Causes of Self-Referrals: Missing Tracking Code and Incorrect Cross-Domain Setup

20120714-self-referralsview at full size

The occurrence of your own website in the referrals report usually indicates missing tracking code or incorrect cross-domain setup.

It’s normal to see a few occurrences of your own website in your Referrals report. If a visitor waits more than 30 minutes between two page accesses on your site, the second pageview will count as new session, with medium as referral and source as your own domain.

If, however, the Referrals report shows a significant number of self-referrals, you’re probably dealing with either of the two issues below:

• One or more pages on your site are missing the Google Analyitcs tracking code.

• You are using the same tracking code on more than one domain and have not correctly cross-domain tracking (for a shopping cart that resides on a separate domain, as one example).

In upcoming posts, we’ll use the Landing Pages report to isolate both of these issues, and we’ll walk through correct setup for cross-domain tracking.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Manually Add Google Analytics Tracking Code to WordPress

Google Analytics Tracking Code manually added to WordPress headerview at full size

You can manually add the Google Analytics code tracking to header.php in WordPress.

A recent post discussed free WordPress plugins for Google Analytics. Several of these plugins are easy to use and flexible, but another option for tracking WordPress is to add the Google Analytics tracking code directly into header.php.

To do this, you can open header.php in the editor and insert the tracking code just before the </head> tag. You can also add any customizations that you may need, such as for cross-domain tracking or Enhanced Link Attribution.

While a plugin may meet your needs in most cases, it’s good to have the flexibility of code editing when you might need it.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Install a Free Google Analytics Plugin for WordPress

Google Analytics plugins for WordPressview at full size

WordPress offers several free Google Analytics plugins.

The extensibility of the WordPress platform and the contributions of the WordPress developer community allow us to add endless capabilities to WordPress sites, usually with minimal setup, and often for free. Among available plugins are several that inject the Google Analytics tracking code into your pages.

As a minimum for configuration, you’ll need to specify your UA number, or Google Analytics Property ID, which you can access within the Google Analytics interface for your property, either on the admin screen or within the tracking code provided.

If you’ll need to configure cross-domain or subdomain tracking, make sure that the plugin permits the necessary changes to the tracking code.

Apart from installing the tracking code, some of the Google Analytics plugins allow you to include a Google Analytics dashboard on your WordPress site, either for yourself as administrator or for your visitors.

If you don’t find a plugin that allows sufficient customization of the Google Analytics tracking code for your needs, you can always add customized code to your pages by manually editing the WordPress include files – more on this in an upcoming post.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Find Scripting Errors with the Chrome JavaScript Console

Chrome JavaScript Consoleview at full size

The Chrome JavaScript Console displays scripting errors.

You access a new page on your website and check the Google Analytics Real-Time > Content report, but the page is not listed.

You then check Google Tag Assistant in Chrome, and – surely enough – you see a red “Not Working” error.

You right-click directly on the page, select View Source from the context menu, and verify that the Google Analytics tracking code is present on the page.

Why isn’t the page tracking?

The problem could be a JavaScript error. Any script error that occurs higher up in the page source than your Google Analytics tracking code will prevent the tracking code from executing.

Even if you’re not in a position to fix JavaScript errors yourself, you can take advantage the Chrome JavaScript Console as an primary tool for troubleshooting problems with the tracking code and other Google Analytics elements such as events and custom variables.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Verify Tracking Code with Google Tag Assistant for Chrome

Google Tag Assistantview at full size

You can use Google Tag Assistant to verify the installation of the Google Analytics tracking code.

In a previous post, we checked our Google Analytics tracking code installation through Chrome Developer Tools. There is now a specific Chrome tool – Google Tag Assistant extension for Chrome – that you can use to verify the Google Analytics tracking code on any webpage, along with other Google code snippets such as AdWords conversion tracking.

Tag Assistant is useful for validating that the tracking code is present and functioning correctly, and also for quickly inspecting the code, which is useful to verify variations to the standard code, such as _setDomainName for cross-domain tracking.

Remember that you are not limited to using these tools on your own websites. You can use Tag Assistant, for example, to quickly determine the presence of the Google Analytics tracking code on any website. (If Tag Assistant tells you that the tracking code is not working correctly, you can do your good deed for the day by informing the owners of the site.)

For more information on Tag Assistant, see the Google help pages and the Google Analytics blog.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Check Pageview and Event Tracking with Chrome Developer Tools

Checking Google Analytics events with Chrome Developer Toolsview at full size

You can check Google Analytics pageviews and events with the Developer Tools built into Chrome.

By taking advantage of the features built into Chrome for monitoring server requests, you can check that your pages are firing Google Analytics pageviews and events correctly:

1. Click the three-bar menu in the top right.

2. Select Tools > Developer Tools.

3. In the Developer Tools panel that appears at the bottom of the screen, select the Network tab.

4. Access a page on your website.

5. At the bottom of the Developer Tools panel, click Scripts, and locate ga.js in the list of requests on the left. This file, ga.js, is the Google Analytics Javascript file referenced by the Google Analytics tracking code in your Web pages.

6. At the bottom of the panel, click Images, and locate __utm.gif in the list of requests. This is the “tracking pixel” request to which ga.js appends a range of name/value pairs that Google Analytics parses into your reports.

Congratulations: Google Analytics has tracked this pageview successfully. If you also want to make sure that you have correctly formatted any event calls that you have included on the page – did I forget a single quote somewhere? – you can continue in Developer Tools as follows:

7. At the bottom of the panel, click the Clear button.

8. On your Web page, perform the action that is intended to generate an event.

9. Click __utm.gif in the refreshed request list, and select the Headers tab.

10. If, as formatted below, the Query String Parameters section lists utme with your _trackEvent parameters, Google Analytics has successfully tracked the event:

utme:5(twitter*follow)

The Developer Tools feature is, in fact, particularly useful for checking events, since the Google Analytics Real-Time reports do not monitor events as they do pageviews.

In addition to Developer Tools in Chrome, you can check pageviews and events using the Firebug plug-in for Firefox – thanks to Pranshu Arya for outlining this procedure. You can also use the Web Inspector in Safari if you have enabled the Developer menu in your preferences.

Please share this post:
Facebook Twitter Plusone Linkedin Email

12 Google Analytics Resolutions for 2013

 

1) Set up goals for all form submissions.

Goals aren’t retroactive, so make sure to set them up for all form submissions as early as possible in your Google Analytics implementation. Without conversions, there are no conversion rates.

 

2) Learn the ins and outs of funnels.

Once you have a goal, it’s very useful in many instances to build a funnel on top of it so Google Analytics can calculate metrics such as Abandonment Rate, but to use funnels most effectively, you should understand a few of their idiosyncrasies and limitations.

 

3) Don’t ignore Page Value.

The unassuming and underused Page Value metric (formerly $index) is indispensable in determining which pages are pulling their weight towards goal conversions and e-commerce transactions. (For this reason, make sure to assign values even to non-monetized goals, in a separate profile if you don’t want to skew actual e-commerce and goal monetization.)

 

4) Tag all inbound links with campaign parameters.

How effective is your monthly email newsletter at driving visits and conversions? How about your press releases? There’s no excuse to be in the dark on these basic questions – tag those links!

 

5) Track PDFs views and external links with Virtual Pageviews or Events.

It’s easy to forget that views of PDFs (and most other document formats) and clickthroughs to external sites are not captured with the default, pageview-based Google Analytics Tracking Code. Virtual Pageviews and Events provide an easy solution.

 

6) Avoid the built-in “Non-paid Search Traffic” Advanced Segment.

Lumping branded organic traffic and non-branded organic traffic is, for most purposes, a very bad thing. Define your own non-branded organic Advanced Segment. (And define other Advanced Segments of your own as well – better segmentation generates better insights.)

 

7) Track different social actions differently.

A Facebook Like that originates from your website can mean two very different things. Understand how social actions differ and track them appropriately.

 

8) Keep a chronology with Annotations.

When did the new home page go live? When was our company mentioned in the Wall Street Journal? You can’t make correlations between your Web data and relevant events if you don’t remember when those events happened. Maintain a comprehensive timeline with the convenient Google Analytics Annotations feature.

 

9) Incorporate qualitative evaluations into your conversion optimization plan.

An in-person or online user test can quickly reveal a conversion pitfall that could otherwise lurk in your Google Analytics reports indefinitely.

 

10) Run Content Experiments regularly.

Nothing like a head-to-head contest to tell you quite definitively what works better for conversions. If you haven’t yet run a Content Experiment or used a third-party A/B testing tool, start now.

 

11) Establish core KPIs (key performance indicators), and check them at least monthly.

As Brian Clifton says, Web analytics is like going to the gym: if you don’t do it regularly enough, you’re not going to be satisfied with the results. Consistent scrutiny of meaningful KPIs will lead to useful and actionable insights across the board.

 

12) Use Those Same KPIs for Daily or Weekly Custom Email Alerts

Don’t wait unnecessarily to find out that visits or conversions have dropped by 20%. Take advantage of Custom Intelligence Events to actively monitor your essential metrics and receive email alerts for substantial deviations.

 

Best wishes for a customer-focused, data-driven, conversion-optimizing new year!

Please share this post:
Facebook Twitter Plusone Linkedin Email

Including the Tracking Code in Page Templates and Standalone Pages

view at full size

You can include the GATC in page templates or, as needed, on individual pages.

When you’re implementing Google Analytics, it’s important to understand how the Google Analytics Tracking Code (GATC) is included on your Web pages.

On most websites, the GATC is not included manually on each page. Why? Because most midsized to larger Websites are based on page templates that provide the overall page structure – including header, footer, navigation, styling, database access, and coding elements – from which individual pages are dynamically constructed on the server when a visitor requests them in a browser.

Just as three examples, URLs such mysite.com/mypage.php, mysite.com/mypage.aspx, or mysite.com/mypage.jsp correspond to pages that:

  • are dynamically generated as Apache/PHP, ASP.NET, and Java Server Pages respectively
  • do not reside on the server as standalone .htm or .html files
  • are very likely generated from a template

In most cases, when you’re including the GATC on your website, focus on page templates and not standalone HTML pages. While you can certainly add the GATC to standalone pages as needed, you can probably cover most of your site with the GATC physically included in only a small number of templates.

Please share this post:
Facebook Twitter Plusone Linkedin Email