Advanced Analytics Configuration

Increasing the tracking level on your website is useful to speed up the analysis of the performance of all your online traffic sources. Generating statistically significant findings requires having confidence in your data but when you only have a couple of conversions and are paying significant sums of money for online advertising, additional tracking will surface the high and low performing areas in your account faster - and time is money.

For niche products coming to market and learning about their customer base, increased tracking speeds up the process of finding the next area to focus on.

When you opt for an Advanced Analytics Setup with Tomachi Corporation, you will be supplied with a customised training manual that includes a record of all the settings we have changed in your account, and lifetime support of the protocol tracking script.

Track the Un-trackable

Allows you to track via Event Tracking in Google Analytics clicks on:

  • Email / mailto: links
  • Phone / tel: links
  • Document Download links (PDF, XLS, DOC, ZIP etc)
  • External links to other sites

Some interactions sending the user away from the webpage - to telephone, email, an external website, or even the download of a PDF file. Traditionally these have been dismissed as not able to be tracked. The screenshot below shows a real world example of our Tomachi Corporation protocol tracker:

Track the untrackable

Track the untrackable

Email link clicks and hovers

When site visitors hover and click on email links, an event will fire for each hover and click that also tracks the email address in question. This allows you to see how many hovers and clicks are occurring on your various email addresses listed on the site.

No change is required to any code and you can continue to use the normal methods you use to insert email links - so long as they are of the standard mailto: format, they will be automatically picked up by our script.


Email link clicks and hovers

Email link clicks and hovers


Form submissions and hovers

With a small addition of a div tag to identify the form, we can also track when visitors hover and click on your form elements. This is useful for sites which have lead-generation forms.

Phone number clicks and hovers

If the phone numbers on your website use the new tel: hyperlink format, they will be automatically picked up by our tracking script - with no change required to your site code at all. The script picks up the number and includes this in the event label.

Phone number clicks and hovers

Phone number clicks and hovers

Staff and Developers Filter

Here we will discover the IP address of your various offices and compile these into your analytics manual, and configure a custom filter in your analytics account. At the same time, a Raw profile is created that does not have the staff filter applied, and optionally we can create a staff only profile if desired, which will only contain the activity of your staff and developers.

Main, Raw and Test Profiles Created

A raw profile is a duplicate of your Main profile, but with no filters added to it. This is useful for the occasions when the design or application of a filter causes accidental data loss in the account. Having a raw profile is useful and provides a backup for those cases. We will duplicate all the goals for both raw and test profiles when creating them. A test profile is used for experimenting with advanced filters and is usually only required when a new filter idea is being developed, and it is important not to disturb the data in the Main profile.

Event Tracking for Add To Cart Buttons

We can add event tracking to your Add To Cart buttons in a variety of ways. In some cases, such as on the WooCommerce plugin for WordPress, this is a simple matter of activating the tracking feature in the program. For other systems, we'll try to recommend the best practice method of tracking these, and for all others we simply add one line of code to each button to fire an event at the precise moment the user clicks "Add to cart".

For WooCommerce, the product SKU is recorded in the event label.

If desired we can also work with your developer to record the product label itself in the event for easier analysis, and we can also optionally tracking the value of the event as an event value.

Event Tracking for Add To Cart Buttons

Event Tracking for Add To Cart Buttons

If your analytics account commerce values are used in Adwords for optimisation, we can optionally filter the event values for your Main profile, but let the values through into a dedicated "Add to Cart Value" profile, to avoid cluttering up your Main profile with non-commerce values.

Time On Site Goals for 15+ minute visits

Most sites can benefit from having a time on site goal configured. This is especially true for sites with large amounts of information or large product range, but also useful for sites with low traffic or conversion rates, because it provides a good natural proxy for conversion in cases where only a very little amount of conversion data exists.

Custom Reports Setup

One issue with the standard setup of Google Analytics is that you can never sort by Goals. You can sort by visits, and sort by goal conversion rate, but often this yields items with 100% conversion rate near the top, but with only 1 sale and 1 visit, this type of report is no use at all:

By configuring custom reports you can see reports that contain actual integers for the number of goals converted to sort by, that can show which traffic sources sorted by conversions:

A series of custom reports are setup in your account:

  • Ad Group Performance
  • Keyword Performance
  • Location Performance
  • Source / Medium Performance

These all have the following report tabs: Goal set 1, Goal 2, Goal set 1 and 2 Combined, Ecommerce.

You will be consulted on any reports that you would like to see and we can configure a totally custom report for you to put various dimensions and values alongside each other.

Custom Reports Setup

Custom Reports Setup

sort by conversions

sort by conversions

Dashboard Setup

We'll discuss your individual reporting requirements and create a tailored custom dashboard in your analytics account for you. This is a good place to include comparisons of branded versus generic (non-branded) keyword traffic, and we can write regular expressions specifically for this task.

Dashboard Setup

Dashboard Setup

Automated Emails Setup

Once a custom dashboard is setup, we can configure this to generate automated PDF reports sent daily, weekly, monthly or quarterly.

Internal Site Search Tracking Active

If your website contains an internal search facility, we will enable tracking of this in your account. Note that this requires that the search form use the method=get method.

Ecommerce Tracking Setup

Google Analytics has some great built-in functionality to track ecommerce transactions, yet many online businesses in New Zealand do not take full advantage of this. In the past, integrating with GA ecommerce tracking required some additional development work, but nowadays the majority of shopping carts and CMS systems directly support this type of tracking.

Implementation will give immediate visibility of a range of very useful reports such as:

  • Top products
  • Average order value
  • Return on investment of advertising (ROI and ROAS)
  • Average number of items per order (quantity)
  • Time to purchase / Visits to transaction
  • Revenue per click

All the reports above can of course be sliced and diced according to your data requirements. For example, you can see top products or average order value of different locations to see what people are ordering in different cities and countries; see the conversion rate of different traffic sources.

Ecommerce Tracking Setup

Ecommerce Tracking Setup

Organic Word-of-Email Webmail Filter

Do you have an industry which is strongly promoted via word of mouth? In the online world, "word of email" is the phrase we'd likely use to describe email based referrals.

We aren't talking about email marketing here - for your email push campaigns these should already be tracked using Google Analytics Campaign tracking, using the URL Builder tool or your ESP's (email service provider like Mail Chimp, Constant Contact, Campaign Monitor etc) automated tracking system.

We are talking about genuine organic word of email - when a past customer simply writes an email to another person with a link to your website. This type of email does not pass through your ESP and does not get any campaign tracking parameters added to it. This type of traffic normally shows up as a series of referrals from "load balanced" domains from Hotmail, live, yahoo, gmail, and a variety of other webmail clients around the globe. The trouble with this type of traffic is it would show as a great number of referrals on unique lines in GA like this:

Source Visits / referral 1,497 / referral 1,316 / referral 435 / referral 251 / referral 233

It is as if someone has clicked on a link from - and in reality they have, but it would be great to have a little more intelligence around this traffic type rather than have it blend into all the other traffic coming from your referring websites. And it would also be great to be able to easily differentiate between "word of email" referrals and actual link clicks from partner sites.

Well… the Tomachi Corporation organic word of email filter is here to the rescue by providing two features:

  • Adjusts the medium from referral to email
    • Allows analysis of all word of email in one row together
    • Easy separation from referral and easy to understand medium
  • Puts the key domain all together
    • Allows you to compare Yahoo email to Hotmail to Gmail to see differences
    • Cleans up those load-balanced domains like

The result is a much tidier traffic source table such as:

Source Visits
Webmail ( / email 14,978
Webmail ( / email 13,165
Webmail ( / email 4,354
Webmail ( / email 2,513
Webmail ( / email 2,331
Webmail ( / email 1,025


With the ability to accurately sum all webmail traffic to get an overall picture, this is a very useful filter to apply. We use a complex regular expression that is able to automatically detect clicks from popular webmail clients such as:

Hotmail / live

Yahoo mail



As well as some lesser known webmail clients such as:

Brand Regular Expression Developed

Most business owners and web analysts included have trouble separating branded search traffic from generic (non-branded) search traffic. This is an important distinction to make because while their rankings for brand phrases are normally very high, and with high conversion rates, it is the generic traffic that contains the much higher level of traffic and new customers. People searching for your brand are obviously already aware of your product and may have already visited your site, whereas people searching for generic keywords associated with your product are much less likely to be aware (or they could be shopping around to find the best deals).

The problem is that just typing in your brand ("Tomachi Corporation") into the search box on GA does not cleanly capture the entire theme in one hit. You often find misspellings and alternate ways of using your brand that would require stitching together a great number of reports and is essentially not feasible. It would not capture "tomachicorp" (without the space and shortened) for instance, nor would just using the shorter "tomachi corp" as a search filter be satisfactory.

The solution involves creating a custom regex (regular expression) that can be used in various places like the keyword search box in Google Analytics. A regex allows dynamic matching which is able to deal with multiple variations of your brand. This would pick up mis-spellings as well as past brands (if you have re-branded), and can include any number of sub-brands. Sub-brands such as company directors and key products can be added to the expression in cases where these get a significant amount of traffic.

The regex for Tomachi Corporation is:

tomachicorp|tomachi corp|tom atkinson|tomachi ltd

Using this regular expression we can see how it affects the reports, on the left we have our branded keywords as detected by the regex, and to the right are our generic top keywords.

Top Branded Keywords Top Generic Keywords
tomachi anchor text distribution
tom atkinson canonicalisation
multiple h1 seo
multiple h1 tags
network security audit checklist
seo audit checklist
url structure seo
anchor text distribution

This information is quite valuable and usually provides actionable insights on what to optimise for next. For example, "anchor text distribution" could be a good choice for further optimisation based on it driving the most clicks.

Video Player Tracking

See how engaged your visitors are.

Cross Domain Tracking

If you use a 3rd party payment gateway that is showing up as the source of traffic of all of your conversions, an install or audit of your cross domain tracking configuration may help. Often this is the way to fix the issue where Paypal or DPS Payment Gateway is the referral source because the user needs to click back to your website after the transaction.

Roll Up Tracking

If you own multiple websites a roll up tracker can be used to see all of your network in one view. A filter is added to make it appear as if they are children of a folder with the domain name as the folder name. CDT (Cross domain name tracking) is also usually enabled for the roll up trackers, but not for the the individual trackers. This way if you have “feeder” sites in your network that send traffic that converts, you can now “see past” that source as a referral and into the previous source when viewed in the roll up tracker.

Bing and Google Image Search Tracking

GA doesn't support tracking of Google Images or Bing Images by default. We can setup custom filters as described here:

We search for regex google(.*)imgres in the Referral path and rewrite the medium from referral to organic, and the campaign source from the various many Google domains to just “google images”. Country of the engine can then be seen in the Full Referrer detail.

This provides for a single line summary of Google Images to replace the 35 lines shown in this instance:

Bing and Google Image Search Tracking

Bing and Google Image Search Tracking


Embedded Video & YouTube Tracking

We can assist with the setup of video using the following methods:


First Touch Attribution

I knew I had finally finished the script once I had this "first touch" attribution script:

 setCookie('source', source, days);
  setCookie('medium', medium, days);
  setCookie('campaign', campaign, days);
  setCookie('term', term, days);
  setCookie('source', source, days);
  setCookie('content', content, days);
  setCookie('referrer', referrer, days);
  setCookie('landing', landing, days);
  setCookie('firstvisit', firstvisit, days);

  try {   // support OLDSCHOOL GOOGLE Analytics
    if (_gaq) {
      var _gaq = _gaq || [];
      // log(_gaq);
      _gaq.push(['_setCustomVar', 1, 'source',   source,    1]);
      _gaq.push(['_setCustomVar', 2, 'medium',   medium,    1]); // 1 = scope 1 is a user level hit data in GA
      _gaq.push(['_setCustomVar', 3, 'referrer', referrer,  1]);
      _gaq.push(['_setCustomVar', 4, 'lending',  landing,   1]);
      _gaq.push(['_setCustomVar', 5, 'campaign', campaign,  1]);
      log(' [sent Custom Dimensions to Classic Async Analytics via _gaq.push()] ' + dumpCookie());
  } catch(e) {
    log("[ERROR caught] " + e);