Set Up Google Analytics Correctly

Google Analytics is always “on the move”. Numerous innovations go online over the course of a year. These innovation cycles overwhelm many website operators. Just starting with Google Analytics and linking it to your own website raises a lot of questions from webmasters, marketing managers and entrepreneurs. This article should therefore help to set up Google Analytics correctly with the necessary overview.

ATTENTION: The text in this blog post does not explain the setup of Google Analytics 4 – the Analytics version that has been current since November 2020. The written instructions only apply to Standard Analytics (Standard until 2014) and Universal Analytics (Standard until 2020).

This video tutorial is available for setting up Google Analytics for beginners:

The written part of this blog post will gradually be converted to GA4 – that will happen in the course of 2021.

If you already use Google Analytics (Universal Analytics) and are now wondering ” Do I have to switch to Google Analytics 4 immediately? “, Let me tell you this: an immediate switch is not advisable (as of December 2020). However, GA4 tracking should already be set up in parallel. The new Analytics version is already collecting data while the “old” Analytics is still being used operationally. Later – in 2022 – the switch to GA4 will certainly make sense.

Why then already tracking in parallel? Because the transfer of “old data” from the previous Analytics to the new Analytics 4 will not be possible!

Google Analytics is without a doubt the most powerful free web analysis tool for websites and online shops … at least until you don’t want to evaluate more than 10 million hits  (page views, events and transactions) per month per “property” .

If you have more traffic on your website, you must / should switch to the paid big brother Google Analytics 360 or switch to an alternative system. Adobe Analytics can be such an alternative for web analysis of large websites.

For some time now, Google has been expanding its analytics software into a full-fledged analysis tool for online marketing by companies. We are constantly working on the user interface, the reports and the tracking base. We’ll show you how to properly set up Google Analytics!

Create Google Analytics tracking code

Many users make mistakes when linking a website with Google Analytics. First you should get the current version of the Analytics Tracking Code from Google Analytics. You can find this code here:

Log in> Administration> PROPERTY tracking information> Tracking code

In this form, however, you should never include the tracking code in your website source code! In order to take into account data protection, you must definitely activate the anonymization of the IP address recording – and this is only possible by manually adding this code snippet in a certain line:

gtag (‘config’, ‘UA-xxxxxxx-x’ , {‘anonymize_ip’: true} );

In the past, it was necessary to add a code to activate the display features. For some time now, this has not been a prerequisite for getting demographic data in Google Analytics.

Demographic data means information on age and gender. The interests and purchasing affinities of the website visitors as well as the creation of retargeting lists work without an extension of the analytics code !

Data protection-compliant use of Google Analytics – including GDPR information

In addition to the anonymization of the IP address recording, a few other things belong to the data protection-compliant use of the Google Analytics software:
This is how you should conclude a data processor contract with Google. This is done digitally online in the analytics tool.

It has been possible to conclude such contracts purely digitally since May 25, 2018 (the GDPR came into effect). If someone has told you that you have to conclude a written contract on paper, then they are not up to date. The PDF that you needed to be able to conclude the contract on paper is therefore no longer available online.

Your website also needs data protection notices (do not use terms such as data protection or data protection guidelines). It is best to put this data protection notice on a separate page to which a link in the header or footer navigation leads. It is best to place this link very close to the imprint link.

Since a house lawyer is rarely available in the company and many shy away from going to the lawyer to create individual data protection information, I recommend using an online data protection generator. This tool is available online and can be used free of charge, provided the source is acknowledged.

You must also give users the option of excluding themselves from tracking by Google Analytics via the data protection information – this is called opt-out.

The integration of a short script in the source code of the website ensures that every user who does not want to be tracked also “stays outside”. 
The duration of the data retention must be specified later during the basic setup of Google Analytics. This is done in the ” Settings at property level ” area.

Another GDPR tip – deleting a user in Google Analytics

If a user / customer of your service / company requests information about the use of their personal data and insists on deletion, then you can delete this user’s data in Google Analytics.

The client ID from the user’s Google cookie is required for this. You can use this ID to find the customer in the ” User Explorer “. You can find this Analytics report in the main navigation point “Target audience”.

If you open the client ID data record, you can “delete user” in the following mask. It only takes two clicks to do this. Once a deletion has been requested, data associated with this user ID will be removed from the individual user report within 72 hours. They will then be removed from the Analytics servers during the next deletion process within 63 days.

Integration of the analytics code on the website

Now you or your webmaster can integrate the extended Google Analytics HTML code into the source code of all front-end pages of your website.

If you use a content management system (CMS) such as TYPO3 , Joomla , Redaxo or WordPress, you have to integrate the snippet into the front-end templates. For many of these CMS, plug-ins (extensions) are also available for integrating analytics into the web.

The position of the analytics snippet is important: The tracking code belongs in the header. In the past there have been other best practices for this – e.g. the end or the beginning of or right before the closing day. All of this is no longer valid.

Integrate Google Analytics with the Google Tag Manager

Embedding tracking codes in websites becomes a lot easier if you manage to use Google Tag Manager or another tag manager system for all of this.

There are many more advantages to using tag managers than there can be disadvantages. The webmaster (or the IT department) only has to intervene once in the source code of the website – when implementing the “Tag Manager” container. The many code snippets that will be required for marketing in the future – including Google Analytics – will later be integrated and maintained by the marketing staff via the tag manager. The IT department is relieved of these tasks.
One of the disadvantages of the Google Tag Manager is (currently) the fact that many marketing managers find it ” too technical “. Small companies and their webmasters or web agencies cannot cope with it, especially when it comes to more complex tracking requirements. In addition, there are concerns from IT departments, which complain about a certain loss of control over script integration via tag managers.

Structure of Google Analytics & administration level

If the implementation of the tracking code was successful, the visitor curve on the target group overview in Google Analytics will start to show for the first time the next day.

If you don’t want to wait for it, you can immediately follow the first peak in the visitor curve in the real-time report from Google Analytics 😉
Now the Google Analytics account must be fully configured. There are three levels in an Analytics account – you can reach these levels via the ” Administration ” button at the bottom left of the screen:

Such an analytics account can have up to 100 analytics accounts. Each account can contain 50 properties (websites and apps).

Up to 25 data views (view) can be created for each property, each of which can be assigned a maximum of 20 goals ( target projects – conversions ). Limits that the vast majority of Analytics users never reach.

Settings in the Google Analytics ACCOUNT area

There are four administration areas in the ACCOUNT area. Under account settings you can give the respective Analytics account a name that is easy to understand for everyone in your company.

You can also regulate data sharing settings here. You have to check a few boxes here if you want to use all reports in Google Analytics.

The tick “Products and services from Google” ensures data exchange with Google Ads and the Search Console. This data exchange makes sense, which is why you should agree to it.
 The checkmark “Benchmarking” activates the benchmarking report under “Target group” in Google Analytics. An exciting report that compares the performance of your website with that of similarly sized companies in the same industry and target market orientation.

The tick “Technical Support” is unavoidable if you also want to get support for Google Analytics via Google Telephone Support. The two ticks in the fourth item “Account Specialists” are not absolutely necessary for this.

The “addition to data processing” is an important element for the data protection compliant use of Google Analytics. With this consent, an electronic data processing agreement is concluded between you and Google.

The legal framework for this is the EU General Data Protection Regulation. As the website owner, you are the data controller. Google Analytics processes this data on your behalf, subject to instructions, to create statistical reports. This digital contract exists to clearly regulate this relationship between you (controller) and Google (processor)

Agree to the addition after you have looked at it via ” Show addition “. An unchangeable time stamp is then set, which is only effectively saved when you press the ” Save ” button at the end of the page.

Then follow the link ” Manage details of the addition on data processing “. In the mask that then opens, first enter the company name. In addition, you have to enter a contact person in this mask who is responsible for data protection as the ” primary contact ” in your company. In most cases this is the managing director. If your company has a data protection officer, please also provide their contact details.

It continues with the user administration. This is very convenient in Google Analytics. You can people with a Google account at every level of Google Analytics grant access – either the whole account of your company or only to one property (website or app).

You can also differentiate between four different levels of authorization: Read and analyze, collaborate, edit and manage users.

In the change history, you can see exactly who made which changes in the Google Analytics account. Very useful just in case!

All filters that have been set in an account can be viewed via the so-called item in the account settings. Every filter that has been created in an account and is visible here is available for reuse for all data views of all properties of this Analytics account – very practical!

In the trash everything is stored, you delete the account, such as old properties and views. These deleted elements only disappear completely after 45 days.

Under “Property Settings”, after the property name, the standard URL and the standard data view must be selected. Choosing the right industry for the website completes the easy part.

Most Analytics / Google Ads users do not need the ” Advanced Settings ” for overwriting the automatic tagging (GCLID values) with manual tagging!

If you want to know how close or far you are with your property from the 10 million hits limit of free Google Analytics use, you can take a look at the property hit volume at this point. The number of hits for the last 30 days is the decisive criterion here.

You can ignore everything to do with in-page analysis. The extended link attribution does not have to be activated.

The item “Property Settings” closes with the items Search Console and User Analysis.

The combination of Google Analytics with the Google Search Console is necessary because otherwise the reports under Acquisition> Search Console remain empty. However, especially with the report on landing pages, these provide exciting insights that you should not miss.

In addition, through the Search Console link directly in Analytics, Google shows us the actual search queries for which Google displayed our website as a search result, the average position in the search results page and how often our search result was clicked on.

The link between Google Analytics and the Search Console is started using the “Customize Search Console” button. The following dialogue is easy to understand:

In the ” User analysis ” item, the ” Activate measured value ‘User’ in reports ” switch is set to ON by default. This ensures that in many reports from Google Analytics the primary metric is “users” and not – as in the past – “visits” (sessions).

It continues in the “main menu” of the property level:

All tracking information can be found directly under the user administration for the PROPERTY level, for example the tracking code mentioned several times above for integration into the website.

You should definitely configure the items data acquisitiondata storage and the link exclusion list.

Under “Data collection for advertising functions” you can activate remarketing in the display and search network of Google Ads in connection with retargeting lists based on Google Analytics data. This makes a lot of sense in advanced advertising with Google Ads , which is why I recommend activation. If the subject of the GDPR is very sensitive in your company, you should first discuss with the management whether you would like to use this function. Going to the data protection officer can also be advisable.

The same applies to the functions for advertising reports. Remember, however, that when activating and using these advertising channels, the data protection declaration on your website must be expanded to include information on the use of such services. Therefore also the consultation with the boss or data protection officer and (if you are an agency) possibly with your customer.

Since the beginning of 2019, Google Analytics has been offering the activation of Google signals on this page of the property settings. With this new technology, data acquisition and remarketing are implemented across devices. That is a big step forward. It is therefore advisable to go with this upgrade.

Select ” START NOW ” and click ” NEXT ” to activate Google signals. In the following dialog, please select “Activate for this property ” and press the ” ACTIVATE ” button. With “DONE” you return to the initial dialog.

The point of data retention clarifies the retention period in Google Analytics of the data you send and which are linked to cookies and advertising IDs. Most standard reports are not affected. Changes to these settings take effect after approximately 24 hours.

The GDPR obliges us not to collect data indefinitely. We are only allowed to collect data that is necessary for the successful provision of a service to the customer / user. If the service has been performed and there are no other legal retention periods, then the data must be deleted again. With the settings in this area, we regulate this point for the website analysis tool Google Analytics we use.

Please enter your own domain name in the referral exclusion list, unless this has already been done automatically by the system. This ensures that – for whatever technical reasons – your own domain can never be output as a traffic source in the Acquisition> All Accesses> Source / Medium report or in Acquisition> All Accesses> References.

If you work with payment services such as PayPal to accept payments from your customers online, then very often the domain of the payment service provider must also be added to the link exclusion list. Only then can Google Analytics properly assign conversions and eCommerce sales to their original source.

Connect your Google Ads account (and your Google AdSense account, if applicable) with Google Analytics under ” Product links “. This link is important so that you can view important reports on the performance of these two Google tools in Google Analytics under Acquisition> Google Ads (and, if applicable, Behavior> Publisher ).

If this is successful, then two or three ” Linked Products ” should now be displayed with a green tick as successfully connected to Google Analytics when you click on the menu item ” All Products ” . CONGRATULATIONS 😉

Settings in the Google Analytics area DATA VIEW

Important foreword: In order to be able to use Google Analytics meaningfully, various settings and filters must be set on the data view level. Some of the necessary filters make data irretrievably disappear. Therefore, the RAW DATA should always be collected in an unfiltered data view and remain untouched – this raw data view is your fallback solution !

In a second data view, you work productively. You create this using the blue button ” + Create data view ” in the administration interface:

In the newly created data view, a meaningful name for the new data view and the URL of the website examined with it must first be stored under ” Data view settings “. In addition, the correct country with a suitable time zone should be selected here.

You can leave the ” Standard page ” field blank. Optional – and only do it if you are ABSOLUTELY sure : However, during a check, make sure that the start page of your website is accessed both under and then you should enter the comment “index.html” in the “Standard page” field. This page is only ever displayed under one entry in the Analytics reports. Of course, this also applies to other start page variants (e.g. index.php).

The point Exclude URL Query parameters you use for unnecessary parameters from the URLs in the reports under Behavior> Site Content to remove automatically. Enter fbclid here right now. This way Facebook does not spoil the evaluation of the website content with its URL parameter fbclid.

Next, select the currency in which the amounts of money should be displayed in this Google Analytics data view.

In addition, under ” Filter out bots ” click on the note “Exclude all hits from known bots and spiders”.

The final point here is the Site Search settings. By activating site search tracking, you can view a report in Google Analytics that displays statistics on the use of the search function on your website .

Continue in the “main menu” of the data view level:

Directly under the settings of the data view and the user management especially for this data view, you can set up goals.

This is extremely important in order to be able to measure with Google Analytics how well you can achieve the goals defined for it with your website:

  1. The aim of a web shop is to generate sales – this is how we define sales as a target.
  2. The website of a service provider often aims to generate new customer contacts (leads) via a contact form – so here we define the successful sending of the contact form as a goal.
  3. An online community relies on registrations – this is how we define the successful registration of a new user as the goal for the website!
  4. At the end, the set up goals are shown in the overview:

For online shop operators, Google Analytics also offers tracking of e-commerce data. Web shop operators are strongly advised to deal with the e-commerce settings . This Google Analytics Help article explains exactly how to set up Analytics eCommerce tracking .

Important Google Analytics filters

Not every data point should be visible in every data view of Google Analytics – except of course in the RAW DATA view!

You should exclude website traffic from your own employees using a filter rule. Unfortunately, that’s much easier said than done. The exclusion never succeeds 100 percent. Two ways are worth trying:

  1. The exclusion via the company’s own unique IP address. Problem here: Many small businesses don’t have one. Large companies, on the other hand, do, but the IP address anonymization required for data protection is partially torpedoed. Website visits on home office days are also not excluded.
  2. The exclusion of cookies that are installed on employees’ computers. Problem here: The variety of devices including smartphones makes the comprehensive implementation of this solution just as difficult as modern working models, keyword again: home office.

By the way: Reporting errors that can arise from upper and lower case letters in URLs should also be eliminated using filters.

 Fight Google Analytics Spam

Filters are also the key to getting rid of Google Analytics SPAM. Again and again, unfairly acting people try to draw attention to their equally unfair websites by making themselves visible in Google Analytics accounts with fake entries as traffic source, geography, language or event.

The website visits entered in this way in the Google Analytics reports have mostly not taken place, they falsify the statistics and in some cases to the point of uselessness!

So-called ghost spam, in particular, makes life difficult. You can take action against it with a hostname filter, as described by the “luna park” team. For professionals in the field of Google Analytics, a “most perfect” alternative is a filter over a user-defined dimension

As a reminder … your RAW DATA view remains filter-free. Don’t fish the spam out there either!

You might be interested in the following article too:

Evaluate Website Search Terms with Google Analytics – Simply Set up the “Site Search” Function

At the end of the day

Anyone who manages to get their Google Analytics account fully configured in at least all of the points described here can be very satisfied at the beginning. These comprehensive settings ensure that (almost) all reports provide data and that many of the reports that follow soon will be active from the start.
 Since things change rapidly with Google Analytics, I advise you to surf through the Google Analytics settings in the “Administration” area at least once a quarter and, if necessary, to react to new functions.

This means your web analysis software is always up to date.

Happy Optimizing!

Leave a Reply