Is it possible for manipulate google analytics?

By default, Google Analytics collects and shows data of (nearly) all your website visitors, but what if you want to manipulate this process?

At certain times you want to look at a subset of your data as this can help you to concentrate on relevant and segmented data insights instead of looking at overall trends. Segmentation is key in effective data analysis and optimization.

With regards to segmentation you have the option to both permanently and/or temporarily modify the data.

Permanently Manipulate Data

First I will explain three methods to permanently affect your data in Google Analytics.

Please be careful when using these methods since you can’t undo historical manipulated data.

1. Modify Google Analytics Tracking Code

The first method you could use is directly modifying your Google Analyics tracking code. It’s a safe method if you have at least some basic technical skills, however in some cases simply finding the required GA tracking code changes online will do.

Multi-Domain Tracking

Let’s assume your online ecosystem spans over multiple different domains, simply adding your GA tracking code to both domains doesn’t deliver the desired results.

You will end up seeing the wrong referral information and unreliable user and session stats, just to name a few problems that inevitably occur. You need to make some technical changes to get this to work.

Sample Rate

Google Analytics sampling can be a big issue if you are dealing with millions of users each month. You have the option to lower the percentage of users that are tracked and thereby limiting the effect of sampling.

It’s each to implement this by adjusting the sample rate.

Event Tracking

You won’t be able to record special events (downloads, video clicks, external links) without modifying your original tracking code. By default, Google Analytics only registers “pageview” related stuff, but not what’s actually happening on the page itself.

This guide clearly explains how to set up event tracking on your website. Make sure to use non-interaction events if you don’t want to influence your bounce rate.

2. Manipulate Data Collection via Google Tag Manager

Nowadays quite a few people, including myself, use Google Tag Manager to manage their Google Analytics tracking. It’s very handy for marketers and analysts since they become less dependent on their IT department.

if you like to get educated on Google Tag Manager. It provides you with great flexibility on modifying your Google Analytics data collection process.

3. Apply Google Analytics Filters to One or More Data Views

Modifying your Google Analytics tracking code (method 1 and 2) affect all data being stored in Google Analytics. And this effect is permanent on the account level.

I recommend to use Google Analytics filters if you want to affect your data on the view level.Five reasons to use Google Analytics filters:

  • Exclude known IP addresses from your data.
  • Set up a view for one traffic source, e.g. organic traffic.
  • Correct Google Analytics campaign tracking issues.
  • Exclude all technical query parameters at once.
  • Collecting data from one specific region or country.

These three methods can greatly enhance the quality of your Google Analytics data however they permanently affect your Google Analytics data so let’s look at a few that will only temporarily affect the Google Analytics data in one view.

Temporarily Manipulate Data

The following three methods are a great solution if you want to temporarily affect the data you are seeing and are a great way to perform powerful ad hoc analysis in Google Analytics.

1. Segments

In my opinion segments are one of the greatest features in Google Analytics; I like to put it this way:

Use segments for ad hoc segmentation purposes. And use filters for your long term segmentation strategy.

Google Analytics currently contains 22 default / system segments and infinite possibilities to create custom segments. Segmented are applied at the view level; you can look at segments in isolation or compare one segment to another or all traffic data.

Limits on Segments

  • 1000 Segments per account.
  • 100 Segments per user, per view.
  • 100 Segments shared across users, per view.

I recommend to watch this segments video by KISSmetrics if you are not yet very familiar with segments in Google Analytics.

2. Table Filters

One segment can be applied to almost all reports in Google Analytics. On the other hand there are two good options to choose from if you want to manipulate the data of one report.

One great feature is table filters.

  • Standard table filters allow you to filter data for the first dimension in your report and this can sometimes be limiting.
  • Advanced table filters are more powerful as they allow you to filter on all available dimensions and metrics in your report.

2a Standard Table Filter

In the example below I have manipulated the source/medium report with a standard filter on organic. The filter is matched to the first dimension, in this case source/medium and the report temporarily shows only organic search data:

But what if you want to be able to both affect metrics as well as additional dimensions in your report? This is when advanced table filters are a huge help.

2b Advanced Table Filter

Advanced table filters are more complicated, but are easy to apply once you know how it works. I will guide you through this using five easy steps.

Step 1: Add “region” as a secondary dimension to the source/medium report.

Step 2: Open the “advanced tab” on the right.

Step 3: Click on visible dimension (in this case: region).

Step 4: Select to include % new sessions greater than 80%.

Step 5: Review your report data.

Last Thoughts

I have talked you though six methods to manipulate your Google Analytics data:

  • Modify your GA tracking if you want to permanently affect your data on the account level.
  • Add filters to one or more views to permanently affect your data on the view level.
  • Use segments to temporarily affect the data of your Google Analytics reports in one view.
  • Use table filters to temporarily affect the data of one Google Analytics report in one view.

As a last tip, I recommend to start out with table/report filters and segments. If you feel you really understand when and why to use them then you could start playing around with filters.

Once you know how to deal with filters – and you possess good technical skills – you can think about modifying the Google Analytics tracking code.


(Note this is only a claim which seems to be false)