How To Retrieve Traffic Sources Data Without Google Analytics Cookies

published by on 22nd July 2015 under Google Analytics, Our Work

Blog post cover

At FIRST, we have a deep level of understanding of analytics and its application to our clients’ requirements.  As an example, a client has a custom CRM and wanted to retrieve the first and last click data into their CRM system. They wanted to truly measure new customer acquisition by understanding their very first originating channel. However, with the upgrade to Universal Analytics, there is no Google Analytics cookie present anymore where values can be extracted

To overcome this, FIRST designed and built a solution where two custom cookies were created per user and where their originating traffic source was not overwritten.  What this means is that the client can understand how they attracted the user to visit their site in the first place – thus, allowing for smarter business decision in terms of where to spend valuable marketing budget.

In this post, I’m going to show you a way to retrieve traffic sources without Google Analytics cookies. As this is a working project, feel free to contribute. Your ideas are welcome.

Now, let’s get down to specifics.


The Problem with Universal Analytics in Tracking Traffic Sources

With the Google Analytics traditional tracking method (ga.js), it was easy to get these data since they were stored in the __utmz cookie. However in Universal Analytics (analytics.js), these data are stored on Google’s server, making them impossible to retrieve. You can only see the value of traffic sources in your Google Analytics reports.

You are probably wondering why would you need to use these traffic sources data outside Google Analytics anyway.

Well, retrieving these data can be useful for mainly two reasons:

  • To push traffic sources data to your CRM system, which doesn’t have a built-in solution to integrate Google Analytics. As explained earlier, we designed this solution for a client who needed to access the first and the last click data to push it in their CRM system;
  • To fire tags based on the traffic source data, e.g. enable a heatmap tracking tool only for users coming from your Google Adwords campaigns.


The Solution – Stimulating the Google Analytics Processing Flow

In order to retrieve these data, you would need to stimulate the Google Analytics processing flow to determine the values of traffic sources parameters:

  • source
  • medium
  • campaign
  • content
  • keyword

However this solution sometimes gives different dimensions values than Google Analytics for the following reasons:

  • There is no source precedence meaning traffic sources are overridden by any source – unlike Google Analytics where traffic sources are not overridden when a Direct session follows a paid campaign
  • There is no session timeout defined – unlike Google analytics where a session ends after 30 minutes of inactivity by default, and at midnight
  • There is no ignored referrers – unlike Google Analytics, where you can specify referral domains to be ignored (See Referral exclusion feature). You can still customise the code provided below to ignore a specific referral
  • Only the main search engines are defined for organic source: Google, Bing, Yahoo, Baidu, Ask and Yandex – but again you can customise the code to add your own search engines if needed


The Code:

See the code to retrieve traffic sources data without GA cookie.

What It Does

The first section of the code retrieves the utm_ parameters by following a similar processing logic as Google Analytics. You’ll need to change the “” to your domain.
The self-invoking function creates 2 cookies:

  • the FirstSession cookie retrieving the traffic sources data of the first time session;
  • the ReturningSession cookie retrieving the traffic sources data when the FirstSession cookie already exists.

These cookies expire after 182 days, i.e. approximately 6 months (same as Google Analytics campaign timeout period).


How To Implement This With Google Tag Manager

Implementing this code in GTM is relatively straightforward. All you need is to create:

  • One Custom HTML tag including the code to fire on the landing page only
  • Two 1st Party Cookie variables for the FirstSession and ReturningSession cookies


The “Traffic Sources Data” Custom HTML tag:

GTM Custom HTML tag for traffic sources data


The 1st Party Cookies variables for the FirstSession and ReturningSession cookies:

FirstSession 1st Party Cookie GTM variable

ReturningSession 1st Party Cookie GTM variable


Below are some illustrations of FirstSession and ReturningSession variable values as shown in the GTM Preview:

FirstSession Variable

ReturningSession Variable

ReturningSession Variable 2

Then, you can use these 1st Party Cookie variables to trigger other tags depending on their values. For instance, fire a heatmap tool for returning visitors from your email campaigns only or trigger a pop up for first time users only.



Building a customised solution helped our client identify and understand where customers first interacted with their website. This in turn helped them come up with improved new customer acquisition strategies that increased the number of conversions and satisfied customers on their website.

Now it’s your turn. Have you tried any customised tracking methods? How did you use them? Let us know!

Related posts

The Influence of Customer Reviews

published by on 14th July 2015 under eCommerce, Uncategorized



Why does your eCommerce site need customer reviews?

E-consultancy reports that 61% of customers read online reviews before making a purchase decision, and they are now ESSENTIAL for e-commerce sites.


WHY YOU NEED CUSTOMER REVIEWS - User reviews increase conversion rates!  They can eliminate any doubts potential customers may have about a product, or can help with product selection.


THE SEO BENEFITS OF REVIEWS – Improving conversions and customer experience should be the main purpose of user reviews, However there are considerable benefits for SEO including:

  • Fresh, unique content for search engines
  • Improving rankings for ‘product name’ + review
  • Increased CTR on results pages
  • Long tail targeting
  • Key SEO considerations for user reviews Indexation
  • Non-duplication
  • Breadth of content


BAD REVIEWS ARE VALUABLE TOO – All reviews are valuable, and a mix of positive and negative reviews help to improve consumer trust in the opinions they read.  However too many bad reviews aren’t always good for business.



  • Use a reviews provider
  • Email customers post-purchase
  • Ask for reviews on product pages
  • Make the process as simple as possible
  • Offer incentives, post-purchase for leaving reviews


HOW TO PRESENT REVIEWS AND RATINGS:  It’s great to have lots of reviews, but once the number gets to a certain point, it’s important to organise the reviews and help shoppers make sense of them.  Some ideas include:

  • Rate this review / was this helpful?
  • Average review score summaries
  • Use in filtred navigation
  • Online reviews for in store customers
  • Using charts to display review information
  • Show some detail
  • For travel sites, use TripAdvisor reviews
  • Use reviews in PPC
  • Use them offline


You can read the full article here.



11 Rule of Thumb Tactics to Improve your Conversion

published by on 3rd July 2015 under Conversion Rate Optimisation (CRO)




Summarised and condensed from – see more detail and examples there. CRO is a process.  There are no universal rules, however outlined below are 11 tactics which are recommended for you to test for yourself, and for us are ‘rule of thumb’ tests:


Rule 1. A static hero image with a single value proposition beats a rotating slider

Ultimately users crave control and auto-rotating carousels offer the opposite of that.  The solution? Implement simple, static hero images.

2. Hamburger icon + ‘Menu’ text beats just Hamburger for mobile menus

In most cases, using hamburger + a “menu” label usually performs best.  It removes the ambiguity and makes the icon noticeable and intuitive.

3. A strong and visible value proposition beats having no value proposition

A value proposition is the primary reason a prospect should buy from you, simply put, it’s the #1 reason someone will continue to read or hit the back button.  A value proposition should convey relevancy, quantifiable value and unique differentiation.

4. Sticky content beats having call to actions that disappear when you scroll

On small-screen mobile websites, having a sticky header or footer containing a call to action has consistently increased conversion rates.

5. Including product videos beats no videos

Having video usually converts users better than having no video.  This is not just for branding and awareness, but video can actually help move customers down the funnel and convert them.

6. Removing form Fields beats having multiple unnecessary fields

One sure conversion killer is asking for unnecessary information on forms.  Ask the question “Is this information absolutely necessary to complete the current transaction?” If  you can’t answer “yes” to that question, the form field should be removed.

7. Prominent contact information beats not having contact information visible

Even though it seems like a small thing, putting your phone number and email address on the top of your site usually boosts conversions.

8. Having live chat beats not having live chat

Live Chat has almost become ubiquitous with good service, and with good reason: live chat usually helps convert.

9. Trustworthy testimonials beat no testimonials 

Word of mouth is a huge factor in purchase behaviour, displaying testimonials can help drive trust in your site.

10. Having a guest checkout option beats only having ‘login’ or ‘signup’

When e-commerce sites force registration, they put up one extra barrier for the customer.  1 in 4 customers leave because of forced registration.

11. Free shipping usually beats having delivery costs

Charging for shipping is a conversion killer.  Find strategies to make free shipping profitable for your business.


Read the full article and visual examples at


Buying Personas – Key to Understanding Your Customers

published by on 1st July 2015 under Content Marketing, Uncategorized

Science Behind Creating Buyer Personas

Creating buyer personas will guide you in your digital marketing strategy and help you really understand who your customers are, which will mean more successful content, leading to a more targeted audience, generating more positive results!

Before creating these profiles you need to do some research.  WSI World has provided us with “the science behind creating buyer personas” which provides specific details around building personas.  This guide will ultimately help your team engage with the right people at exactly the right time!  Some elements of the formula include:

Investigation, Research and Collect Data:

  • Web Analytics; examine metrics like bounce rates, organic traffic, page traffic, leads via social media, mobile traffic, conversion rates and referring sites.
  • Collect your own business intelligence and background data; collect data from existing user profiles, sales stats and transactions, calls and outcomes and overall sales revenue.
  • Execute Surveys; whether that be conducted through phone calls, in person or through the web.  Ensuring data is varied and valuable through gender, age, geo-location, income and ethnicity.

Once you have done the background research you will be ready to create your persona starting with giving him or her a name, then analysing the data you’ve collected and defining his/her needs, followed by monitoring behavioural and demographic trends and finally creating your hypothetical customer profile.

All these necessary elements will help you tailor your content perfectly to your target audience, allowing you to engage with your various customer types, subsequently improving your online sales, revenue and ROI.




For more insight check out the “science” here.

Optimizely Benchmark Report Q2 ’15 – Download Your Copy!

published by on 26th June 2015 under Conversion Rate Optimisation (CRO)

benchmark-report-cover-e1434384255205-267x335 has released their Q2 2015 Benchmark Report – a comprehensive report on how A/B and multivariate testing has changed the way companies create ideal experiences for their customers.  If you have questions around Conversion Optimization, this report will give good insights.

Conversion Optimization / Experience Optimisation is a fast-growing area of expertise, and is being adopted and resourced as a competitive advantage for marketing, growth, product and engineering-focused organizations around the world. surveyed digital channel owners to uncover just how they think about and allocate resources towards their programs.

This benchmark report answers questions like:

  • How often do teams optimizing run A/B and multivariate tests?
  • What are the top benefits that optimization programs are seeing?
  • How do optimization teams manage their experiment process?

Download your copy of the Optimizely Benchmark Report here

BONUS Download: Charts from the Optimization Benchmark to use in your next presentation to your team, client, or executive!