Common Mistakes to Avoid in Google Analytics
- Incomplete Tag Migrations – While Upgrading to Universal Analytics
Universal analytics is out of beta. Google recommends everyone to migrate to UA. It has a number of awesome features.
Steps to migrate from Classic Google Analytics to Universal Analytics:
- Migrate through Admin Section of your GA account (it will take 24-48 hours)
- Get the Universal Analytics code and replace Classic codes on every page
You can also use Google Tag Manager (one should have good knowledge of Macros for GTM otherwise it is better that you go by the traditional/ manual method of replacing codes).
After you have replaced all the codes, you will receive a confirmation message from Google.
One common mistake here is to migrate to Universal Analytics on the Admin Section but forgetting to replace UA code on Website pages. This inadvertently results in inflation of data.
- Multiple Tags on One Page
There should be only one GA ID added to a web page. In case you have one classic (UA-XXXXXXXX-1) and one universal tag (UA-YYYYYYYY-1) on a page, make sure that their GA-IDs are different. This would result in double page views count in your GA reports.
Sometimes, the same tag appears twice on a page. This usually happens with custom CMS modules.
The usual mistake here is to activate a plugin which will serve the GA tag during page load, but also add the tag inside the page HTML itself.
- Using Virtual Pageviews
A common mistake is to use virtual pageviews when it is actually not required.
A Virtual pageview is used to track clicks from users that do not lead to actual page views on your website. For example, you might want to count every image viewed inside an image gallery as a separate page view, while all the images might be appearing on one page.
Firing virtual pageviews will require the use of custom JS coding. A common mistake is write JS code which ends up reloading the page and firing the virtual page view, leading to 2 or even 3 additional page views
Think about whether virtual page view is the only solution – event tracking can be used in many of these situations.
- Cross Domain Tracking
Sometimes, the shopping cart of a website is available on a separate domain (shop-domain.com) from the main website (domain.com)
For a correct GA implementation, the setDomainName method needs to be used. A common mistake here is to add domain.com inside the setDomainName function for both the domains.
As Google Analytics works on first party cookies, destination domain refer it as third-party cookies which would result in loss of entire data for the shopping cart.
The correct way to implement is
For the main website: which is the source domain
For shopping cart which is a destination domain
If you want to know some more common analytics setup issues which we usually find during the analytics audit process, please do not hesitate to read further/ get in touch.