How to protect Google Analytics data from being hacked

Some time ago I saw a drastic traffic increasement while looking into Google Analytics data.

Dizzain Google Analytics

I’ve explored traffic sources and detected some new websites in the statistics that actually did not have links referring to Dizzain.com website on their pages. Someone else put our Google Analytics tracking code on their website and caused a bit of a commotion in our data.

So, in this blog post, I will be sharing a solution and explaining what to do if someone else put your tracking code on their website.

Someone put my tracking code on their website. What’s next?

When someone puts your tracking code on their website, Google Analytics receives false data. Fraudsters can’t see your website data, but can corrupt your analytics data for you to make wrong decisions in the future.

How to understand that someone is hacking my data?

Click on the “Customization” button, choose “Create Custom Report” and click on the “New Custom Report” button.

How to create Custom Report in Google Analytics

Choose “Flat Table”, “Sessions” metric group, “Hostname” dimension, click “Save”. Now you can see all the main domains that originate traffic to your website in the view.

Diagnostics of drastic traffic increasement

How can someone corrupt my Google Analytics data?

Corrupting Analytics data is easier than you think. Just go to any website, right-click on the content area, select “View page source” and find the java script code including UA-xxxxxxxx or GTM-xxxxxx (property id/tracking id).

How to find Google Tag Manager ID in the website code

Now all you need is to install the js code to another website to falsify the data.

Note: in case someone stole your GTM id, set up filters for all the data receiving tools installed via Google Tag Manager.

How to secure my Google Analytics data?

Historical data in Google Analytics can’t be changed, so we recommend to set up this filter in order to receive data from your website only:

    1. Click on the “Admin” button at the bottom left corner.
    2. Choose “All Filters” at the account level (1-st column).

How to add a filter to Google Analytics account

    1. Click“Add Filter” and name it.

Adding new filter to Google Analytics account

    1. Choose “Custom” filter type.
    2. Click “Include”.
    3. Choose “Hostname” in the Filter field.
    4. Write domain name in the “Filter Pattern” tab.
      Note: don’t forget to add a backslash “\” before every dot “.” in order to tell regular expressions to see the dot in its original context as a separator.
    5. Mark the “Case sensitive” checkbox.
    6. Apply this filter to the view you’re going to look your statistics through.
    7. Click “Save”.

How to protect your Google Analytics data from being hacked

From this moment you know for sure that Google Analytics data you see in your account is reliable. I do also encourage you to set up the aforementioned filter if you have multiple website versions (production, staging) to hide all the irrelevant data not related to your production website.

Read more →

Case Study: SocialFlow Plugin for WordPress

SocialFlow is a New York-based enterprise software company focused on providing technology that helps companies distribute their owned and earned content across social media platforms. SocialFlow application algorithms analyse user behaviour and optimize all released content based on real-time data.

Read more →

The Most SEO Unfriendly Things about WordPress to Fix

WordPress is one of the most popular website and blogging platforms on the web, powering 25% of all websites. However, just because it’s popular, doesn’t mean that it’s perfect. WordPress is a great option for starting a new website. It gives you some nice defaults for basic SEO. But to be truly competitive it’s going to need a little TLC. If you are meticulous about SEO, then consider making these changes to your WordPress theme. With a little time and set up, you can have your WordPress website running more SEO-friendly.

Read more →

How to Deal with Fake Bot Traffic

It can be very exciting to see a spike in traffic on your website; relief that you are finally doing something right. However, it is becoming increasingly more common to have spikes in traffic due to a fraudulent source known as bad bots.

Read more →

Building SEO into your WordPress Website

How awesome it is to work with a developer to customize your own ideas into a WordPress theme you can be proud of. Standing out from the crowd will win respect from friends and clients. Competitors will be jealous (even though they won’t say so). Ah, and that warm satisfying feeling wells up within you when you gaze upon it. But how do you ensure that your finished product works for search engines too?

Read more →

The Power of the Post: Optimizing WordPress Posts

Have you noticed how within seconds after making a WordPress post it becomes cached and indexed by Google? Other pages may seem to take forever to win attention from search engines. Why does the post seem to carry more weight than other page types? Is it by design or just purely accidental?

Read more →

How to optimize your website for mobile devices

In this day and age, it’s imperative for websites to be accessible across a variety of devices. For years, mobile traffic volume has been steadily and rapidly increasing until in 2015 it finally overtook that of traditional laptop and desktop computers. In addition, Google recently changed its algorithms to favor mobile-friendly sites. Nicknamed Mobilegeddon, this change has penalized the website that were not providing an adequate experience for mobile users forcing the website owners to invest into mobile upgrades.

Read more →

WordPress 4.1.1 is out now, 21 bugs are fixed

The new update to WordPress was posted on February 18th and since then it has been incorporated into millions of websites. The update addressed a total of 21 significant bugs among which was an issue preventing Tags and Categories from having the same name – something that we found particularly annoying in our projects.

Read more →