Tracking Fragment URLs in Universal Analytics with Google Tag Manager

published by on 19th September 2014 under Google Analytics

Ah, fragment URLs – you know these URLs with a hashtag (such as www.example.com/categoryA.html#filter1=abc&page=2), that can’t be tracked with Google Analytics…

Indeed Google Aanalytics strips out everything after the hashtag. Yet seeing what’s after the hashtag can be useful to know what are the most popular filtering options for example or to check if your visitors go beyond the first page of your product listing.

With Google Tag Manager, tracking these URLs as virtual pageviews becomes relatively easy. No need to be a developer or adding any codes on your web pages.

Here is how to do it :

1. Create a Universal Analytics tag for Virtual Pageviews with a hashtag

This tag is different from your existing Universal Analytics Page View tag.

In the field for Document Path, click on the brick to insert the new {{hashtag URL}} macro that you create in step 2.

UA virtual pageview tag for hashtag URLs

UA virtual pageview tag for hashtag URLs

2. Create the {{hashtag URL}} Custom JavaSscript macro with the function below:

function() {
var newURL = window.location.pathname + window.location.search + window.location.hash;
return newURL;
       }

3. Create the firing rules for the UA Virtual Pageview tag

You want to fire the virtual pageview tag when:

  • The URL changes in the browser without the page is loaded again (history change event rule)
  • Or when the user lands directly on a hashtag URL (fragment URL is present on the page load).

The first “History change event” firing rule is as follows:

Firing rule for the UA Virtual Pageviews tag

Firing rule for the UA Virtual Pageviews tag

The rule calls the History Listener tag: {{event}} equals gtm.historyChange (see https://support.google.com/tagmanager/answer/3415369?hl=en#HistoryListener).

The second “Fragment URL loaded” firing rule is like below:

Fragment URL loaded firing rule

Fragment URL loaded firing rule

For this rule, you’ll need to create the {{fragment url}} macro as below:

Fragment URL macro

Fragment URL macro

4. Save your UA Virtual Pageview tag

5. Create the History Listener tag

History listener tag to fire on all pages

History listener tag to fire on all pages

6. Add the “Fragment URL loaded” rule as a blocking rule in your “standard” UA pageview tag

Because you don’t want to double track the hashtag URL on the page load.

7. Preview & Debug your container version

Check that your Virtual Pageview tag for hashtag URLs fires when a fragment URL is loaded (tag fired on GTM Page Load event) AND also when you navigate to another hastag URL (tag fired on gtm.hisotryChange event)

8. Visit your site and check your Real-Time Content report in Google Analytics

Google Analytics Real-Time Content report

Google Analytics Real-Time Content report

Hooray, it works!

9. Create your new Google Tag Manager container version, name it, publish it, and get you a well deserved cup of coffee, tea or whatever beverage you most prefer :-)

 Story based on:

Related posts

New Google Analytics Benchmarking Reports gives Insights and Competitive Intelligence

published by on 11th September 2014 under Digital Strategy, Digital Trends, eCommerce, etc

This morning (US time) Google Announced that new Google Analytics Benchmarking Reports are now available in GA.

These new Google Analytics benchmarking reports allow you to compare your website performance against the averages of similar websites for a variety of dimensions and metrics.

For example you can filter by the following dimensions:

  • Channel Grouping (Direct, Organic, Paid, Referral, Email, Social, Display and Other)
  • Location (Country)
  • Device (Desktop, Mobile and Tablet)

You can compare the following metrics:

  • Sessions
  • % New Sessions
  • New Sessions
  • Pages / Session
  • Average Session Duration
  • Bounce Rate

On the Google Analytics Blog they show an example of Twiddy (see below)

The benchmarking reports even use colour to show at glance whether your business is above or below the industry average.

Google Analytics Benchmarking Report - Twiddy

You will find these reports under Audiences -> Benchmarking in your Google Analytics left hand Menu

If you cannot see these reports, you will need to follow these instructions.  Only if you choose to share your data anonymously with others will you be able to see the benchmarking reports.


NZ Google Analytics Benchmarking Reports data

It does provide interesting data Benchmarks, for example:In New Zealand, for Shopping sites averaging 1,000 to 5,000 sessions per day, Google is currently collecting data from 125 properties. The below data is from these sites for August 2014

  • Average Sessions per Month: 62,000
  • % New Sessions: 45%
  • Average Pages per Session: 6.14
  • Average Session Duration: 4:08
  • Bounce Rate: 35%

And here is how the various traffic sources contribute to total sessions:

  • Organic Search: 29%
  • Direct: 18%
  • Email: 18%
  • Paid Search: 11%
  • Other: 9%
  • Referral: 7%
  • Display: 4%
  • Social: 4%

An observation from this limited set of Data – Organic Search, Email and Direct referral sources are the biggest drivers of website visitors for NZ shopping sites.  Display and Social activity on average do not drive a significant number of website visitor sessions.

Note: We have found a few discrepancies in the data that we will observe further -

1) Not all data correlates exactly with these Google Analytics benchmarking reports.  For example we have a client for which they were showing 10% the average number of sessions being driven by paid search, where we know in fact they are higher than the average

2) The sum of the channels does not equate to the sessions noted in the top line.  Just something to be aware of.

3) For smaller regions (such as NZ) data will not show for many subcategories unless there are enough contributing properties to protect the privacy of those websites.

Perhaps not perfect, but this new Google Analytics benchmarking feature provides reasonable benchmarking data that may be difficult (or expensive) to get in other ways. Take some time and benchmark your business – if you are way ahead of the average, evaluate success and ROI and if well, keep doing more of it.  If you are lagging behind average it gives a good indication of where you need to be investing.

 

Related posts

Searching for new and used cars online – NZ Car Industry SEO Report

published by on 10th September 2014 under Industry Reports, Research

cars industry SEO report

For the full report (PDF) please use our download form

Which New Zealand Car Providers are maximising their market share online?

Find out which car providers are taking the lead in organic search and how they’re doing it.
FIRST has investigated the organic search engine rankings for NZ consumer searches focused on new and used cars, utilising FIRST’s Ranking Based Reach (RBR) analysis framework. In addition, a consumer survey was carried out to discover what the first place of choice for Kiwis is when considering purchasing a new or used car.

 

In this report we discovered:

  • According to an article from automotivenews.co.nz, sales of new vehicles in 2014 are expected to top those of a record in 2013, the best year for the New Zealand motor industry since 1984.* As the car sales market in New Zealand is likely to be very profitable, car dealers should make use of this development and implement suitable digital strategies to increase sales. 
  • Autotrader is leading the RBR (for desktop search), followed by Trade Me and Turners. However, in mobile search Trade Me just ranks on ninth position, left behind by players like AA, Turners, AutoBase and others.
  • In general, search results are broadly dispersed among a wide range of car industry competitors. In this competitive market, some automotive providers have recognized the urgency of ranking well in organic search, nevertheless there are still many companies (especially car brand companies) which are not at all present within organic search. It would make sense for them to invest in a robust and smart search strategy. 
  • In our survey we revealed that buying from a car auction is rather unpopular among Kiwis, and that 75% of the respondents would buy their car at a car dealer. 
  • A digital strategy that integrates both organic and paid search should be a key customer acquisition and revenue driver for car dealers, both online and offline/in store.

 

new cars RBR image for blog post

FIRST uses its bespoke metric called RBR (Ranking Based Reach) to estimate how well each company is ranking in search engines. RBR provides a simple way to compare a website’s search engine rankings with its competitors. RBR is an estimate of the percentage of available search traffic a website will receive for a set of phrases – this gives the sites share of search or reach. It is weighted based on the popularity of each search phrase and the relative click through rate (CTR) of each ranking position.

For the full report (PDF) please use our download form

Websites included in this car industry report comparison:

www.2cheapcars.co.nz
www.aa.co.nz
www.audi.co.nz
www.autobase.co.nz
www.autotrader.co.nz
www.bmw.co.nz
www.buyrightcars.co.nz
www.carfair.co.nz
www.drivesouth.co.nz
www.ford.co.nz
www.holden.co.nz
www.honda.co.nz
www.hyundai.co.nz
www.kia.co.nz
www.mazda.co.nz
www.mercedes-benz.co.nz
www.nissan.co.nz
www.subaru.co.nz
www.suzuki.co.nz
www.toyota.co.nz
www.trademe.co.nz/motors
www.turners.co.nz
www.volkswagen.co.nz

 

Related posts

Facebook Demographics – New Zealand Age Distribution and Gender

published by on under Digital Advertising, Social Media Marketing

This post on Facebook demographics originally published in 2009, has been one of our most popular posts over the past 5 years, so we have decided to update it with 2014 data and make a comparison.

So, what happened 5 years later? Are you interested to know how many Kiwis are on Facebook now and which age group has been growing the most over the last 5 years? Read on and find out or jump to the post from 2009 by clicking here: Facebook New Zealand Demographics – Age Distribution and Gender Update
 

From 2014 Facebook demographic data, we discovered that:

  • The overall female proportion has slightly decreased (compared to 2009) to 54.3% and male numbers increased to 45.7%
  • Most Facebook users are in the age range between 18-24 and 25-34 (22.5% each).
  • However, the older demographic has increased – with 22.4% being aged 45-65
  •  

facebook demographic female_male ratio

Proportion of age groups in 2014 (socialbakers.com)

 

facebook demographic user age distribution

User age distribution (socialbakers.com)

 

How popular is Facebook in New Zealand in 2014? We took our data from Alexa.com and found out that in the New Zealand country ranking, Facebook ranks on third position now, behind google.co.nz and google.com. Trademe.co.nz fell back to the fifth position, and YouTube is now on fourth position.

pages ranking nz

Source: Alexa Ranking (Alexa.com)

 

Next we want to take a look at the Facebook advertising tool, to find out more about Facebook demographics and how many Kiwis can be reached by Facebook.
 

Key insights of Facebook Demographics in 2014

Interestingly, the male vs. female ratio in 2014 is quite similar to the one in 2009. With the major difference that for the group aged 20-24 years, there is a greater percentage of male Facebook users than females. In the age group from 25 to 29 years the male/female ratio is nearly evenly high. Moreover we can see that as age increased, so does the percentage of females – with more than 60% of Facebook users aged between 60-64 years being female.
 
age distribution female vs male

% of each gender on Facebook, by age range (% of those who stated a gender)

 

Increasing number of “older” age groups on Facebook

Also in 2014 we have divided the number of Facebook users at each age range (from Facebook’s advert tool) by the total number of New Zealanders in each age range (from the NZ census website).

We discovered that an accurate picture of Facebook users cannot be drawn, as it seems that some users have more than one Facebook account (we see in the chart below there are more than 140% Facebook accounts compared of the male population in the 18-24 year old age group). Is this multiple accounts?  Is this a younger male audience ‘pretending’ to be older?

Although it is difficult to conclude anything specific about the distribution of users on Facebook we can see clear tendencies for the different age groups. The highest proportion of people using Facebook is in the age group from 20-24 years. Interestingly the male proportion is higher in the age groups from 15-19, 20-24 and 25-29 than the female one and is afterwards dropping below the female one. In the age group from 60-64, only around 30% of male Kiwis are on Facebook, being far less than females with around 47%.

What we found interesting also, is the appearance of the distribution curve in 2009 and 2014. The 2014 curve is not as pronounced towards the younger audience and has more rather linear distribution across the age groups.
 
female vs male facebook users

Estimated percentage of the NZ population on Facebook, at each age range, for each gender and total for 2014.

 

The fine print

With an increase in the numbers of people with Facebook accounts, audience targeting options for Facebook ads have also increased. For example, targeting on behalf of interests, behaviours and connections is now also possible. Moreover Facebook offers a “More Demographics” section which enables to refine targeting (Unfortunately quite a few options are just available in the US).
 

more demographics section facebook

“More Demographics” section

 

We also wanted to take a look at the Potential Reach for different age groups on Facebook. Simplified, the potential reach tells us, how many people we can show our ad to.

The below chart shows the Facebook potential reach, for 3 segments, comparing 2009 and 2014. In 2014 there are 2,400,000 (according to Facebook potential reach) New Zealanders on Facebook (age 18+), which represents 56.6% of the total New Zealand population. Moreover the proportion of female Facebook users, married and aged 30+ has increased from 104,430 to over 280,000 women in the last 5 years.

female over 30 and age over 18

Comparison of the amount of Facebook users in certain segments 2009 and 2014

 

As seen Facebook remains a strong community for New Zealanders, and because of its reach, can be a very effective way for online advertising. When you want to set up an ad for Facebook you receive the possibility to chose, “What kind of results you want for your ads?” With this option you have the possibility to specifically trigger your ads to increase Page Post Engagement, Page Likes, Clicks to the Website and many things more (see image below).
 
what results for ads

Summary: We have seen that Facebook has increased its numbers of users significantly over the last 5 years. Advertising on Facebook can be very beneficial as the target group can be narrowed down to a very specific level.  If you are not doing any Facebook advertising right now or want to optimise your campaigns, please contact us.
 
 
 

2009 DATA: FACEBOOK NEW ZEALAND DEMOGRAPHICS – AGE DISTRIBUTION AND GENDER UPDATE

 
A couple of weeks ago we blogged on New Zealand Facebook statistics, in particular we reported:

  • There are more Kiwi women on Facebook than men (57.5% female vs 42.5% male) and
  • Most of the New Zealand users of Facebook are in the 18-24 or 25-34 age range.

This led me to wonder, what is the percentage of each gender in each age range? Are there any interesting trends? Are there any age ranges where men are more common?

And also, now that Facebook is the most popular site in NZ (aside from Google), what percentage of the NZ population is on Facebook now, and how does that change for each age range?

By the way, in case you hadn’t heard, Facebook overtook TradeMe in July as the most popular destination site for New Zealanders – here’s a graph from Google Trends for websites. (P.S. If you want to know what the other most popular sites in NZ are, here’s the Top 100 according to Alexa and the top 20 according to Hitwise).

facebook-vs-trademe

Graph of visits to Trademe.co.nz and Facebook.co.nz (New Zealand visitors only)

So, let’s use the demographic information from the Facebook advert tool to understand New Zealand’s Facebook demographics a bit better:

The gender gap is strongest for older users

The younger age ranges are much closer to gender parity than the older age ranges.  The 20-24 age range has the highest proportion of men, with 47% male and 53% female. As the age increases though, the percentage of men decreases. The 50-54 age range has the lowest proportion of men, 35% male and 65% female.

% of each gender on Facebook, by age range (% of those who gave a gender)

% of each gender on Facebook, by age range (% of those who stated a gender)

Nearly all young kiwis are on Facebook

A famous quote about Tolkien’s The Lord of Rings is that the world is divided into two types of people, those who have read it, and those who are going to read it. It could be that the same is true of Facebook in New Zealand – kiwis are divided into those who are on Facebook already, and those who are going to be on Facebook soon!

Dividing the number of Facebook users at each age range (from Facebook’s advert tool) by the total number of New Zealanders in each age range (from the NZ census website) shows that the younger age ranges are almost totally assimilated already. Nearly 90% of the 20-24 age range is on Facebook already. The percentage of Kiwis on Facebook falls quickly as age increases – only 30% of 40-44 year olds are on Facebook. And the percentage continues to fall slowly as age increases – only 17% of the over 60′s are on Facebook.

estimated percentage of the NZ population on Facebook, at each age range, for each gender and total

Estimated percentage of the NZ population on Facebook, at each age range, for each gender and total.

Of course this is just an estimate, and in particular there is no guarantee that the number of users reported by Facebook is indeed correct. But given the popularity of Facebook in New Zealand, it can’t be too far wrong.

So if you want to try an advertising medium that will reach a very high proportion of New Zealanders, then Facebook should be your second choice after Google Adwords. First Rate incorporates Facebook ads in the overall online marketing mix (which also includes SEO, Adwords PPC and performance advertising, all tracked by Google Analytics). Please do contact us to understand how Facebook advertising can benefit your business.

The fine print

Facebook allows advertising on a cost-per-click basis as we illustrated last time. And these adverts can be targeted by age, city, gender, education, relationship status and keyword, allowing very strong demographic targeting. The advert tool has these options for the advert targeting:

Demographic targeting options for adverts on Facebook

Demographic targeting options for adverts on Facebook

As you can see, the estimated number of people is shown, and this is where I got the estimated number of NZ Facebook users at each age range from, including gender:

estimated total number of people in NZ on Facebook

Estimated total number of people in NZ on Facebook

estimated number of women over 30 in NZ on Facebook

Estimated number of women over 30 in NZ on Facebook

estimated number of married women over 30 in NZ on Facebook

Estimated number of married women over 30 in NZ on Facebook

P.S. Plenty of other blogs have used the same trick to get useful insights about the demographics on Facebook. Here are a selection of some of the best:

Related posts

Searching for furniture online – Furniture Industry NZ SEO Report

published by on 26th August 2014 under Industry Reports, Research

Furniture industry SEO Report

Download the full Furniture Industry – SEO Reach report (PDF)

 

Which New Zealand Furniture providers are maximising their market share online?

Find out which furniture providers are taking the lead in organic search and how they’re doing it.
FIRST has investigated the organic search engine rankings for NZ consumer searches around furniture related keywords, utilising FIRST’s Ranking Based Reach (RBR) analysis framework. In addition, a consumer survey was carried out to discover what would encourage Kiwis to order furniture online.

In this report we discovered:

  • According to a report from retail.org.nz, sales for furniture have been increasing by 4% in the furniture retailing industry in the period from 2012/2013 (+$33.6m).* As Google Trends shows an increase in demand for furniture related search terms it is likely that sales will further increase. To combat being left behind, retail stores should improve their website rankings position to capture more of the growing online demand.
  • Search demand indicates more consumers researching Online and purchasing In-Store. By being more visible online and forming part of the consumers consideration set, the more chance to influence both online and offline purchases.
  • Search results are broadly dispersed among a wide range of competitors. In this competitive market, some furniture providers have recognized the urgency of ranking well in organic search, nevertheless there are still many companies which are not very present within search. It would make sense for them to invest in a robust and smart search strategy.
  • In our survey we revealed that the product quality is the most important factor for furniture buying decisions, followed by the price and offers. If the product is New Zealand made plays the least important role for most respondents.
  • A digital strategy should be considered that integrates both organic and paid search should be a key customer acquisition and revenue driver for furniture providers, both online and offline/in store.

 

FIRST uses its bespoke metric called RBR (Ranking Based Reach) to estimate how well each company is ranking in search engines. RBR provides a simple way to compare a website’s search engine rankings with its competitors. RBR is an estimate of the percentage of available search traffic a website will receive for a set of phrases – this gives the sites share of search or reach. It is weighted based on the popularity of each search phrase and the relative click through rate (CTR) of each ranking position.

For the full report (PDF) please use our download form

Websites included in this furniture industry report comparison:

 

 

 

Related posts