Why are we still implementing web analytics from the source code level instead of e.g. using Google Tag Manager?

The main purpose of this article is to present the advantages of using a tag manager as opposed to manual implementation and to convert stakeholders who are still using the traditional approach.

It seems nowadays that the implementation of analytics using a tag manager should be an obvious choice for everyone. Implementing it from the code level, however, should be a thing of the past. Unfortunately, the reality is still different in many cases, but let’s start from the beginning…

On November 14, 2005, Google provided users with a powerful free tool to measure website traffic called Google Analytics. The tool was created on the basis of the Urchin Software company acquired by Google.

After placing a few lines of JavaScript in the source of the website, users had access to website statistics presented in an accessible and attractive form. Going beyond the standard implementation, after adding additional codes, webmasters had the ability to track every step of the user on the site.

Without Google Tag Manager, during the first years of Google Analytics, programmers were forced to implement the analytical implementation of JavaScript codes directly in the source code. However, code-level implementation had several disadvantages. So, seven years after launching Google Analytics, on 1/10/2012 Google presented the Google Tag Manager tool. From this moment, people managing websites gained a powerful tool that significantly improves work and provides a number of additional possibilities.

Google Tag Manager Relase Premiere Date

Why is a hard-coded implementation of analytics not a thing of the past?

After seven years of implementing Google Analytics, almost no one had to be convinced to use Google Analytics or alternative analytical systems. Seven years after the premiere of Google Tag Manager, the situation is different. Still many analytical implementations for commercial projects are implemented without a tag management system. In my opinion, there are several factors that affect this state of affairs:

  • Lack of awareness – very often, even in extensive web projects, the potential of advanced analytics is underrated and only the basic version of the analytical code is implemented.
  • Lack of knowledge – there is relatively little information about why you should use tag management systems instead of implementing analytics in the old fashion way.
  • Old habits – seven years passed from the launch of Google Analytics until the appearance of Google Tag Manager. It was enough time to get programmers, marketers or people managing internet projects accustomed to the beaten track.
  • Other methods – still in the Google Analytics tool administration, the first basic method of implementing analytics is embedding the script on the page from code level, so many sites simply do not go beyond this scheme.

Personally, I also had a problem getting rid of old habits. At the beginning, I was also sceptical about the concept of analytics management using a tag manager. For the last few years, however, I cannot imagine a different way, and whenever possible, I use a tag manager. So what convinced me to use a tag manager over the implementation of analytics directly in the code?

Read also: How to be a copywriter in COVID-19 virus time?

The main advantages of a tag manager:

1. Container concept

By placing tag manager code on our site, we gain the opportunity to publish not only analytical codes but also advertising codes or custom solutions. This gives you the ability to manage all external codes embedded on your websites in one place. The developer only implements the container code on the page, while the remaining codes are published from the tag manager tool level.
If you do not use a tag manager, you have to place external code from the code level every time. You don’t have control over all codes at once in one place. Additionally, if you have many independent versions of your websites, in different languages, and the number of tags is greater the process gets even more complicated.

2.google_tag_manager

2. Implementation validation

Thanks to the tag manager, we have the ability to verify the correctness of the implementation in the production environment using a preview mode of the tag container and debug mode.
If you do not use a tag manager, you are forced to test implementations in a production environment by making it available to all users of the site – a bad idea – or verify implementations in a separate test environment each time, which requires the needless involvement of additional resources.

Google Tag Manager Debug Mode

3. Teamwork

In the tag manager you have the option of defining specific roles for users such as publication, approval, editing or reading. Thanks to this, certain people have clearly defined rights. Additionally, thanks to versions and workspaces, you can work on implementation simultaneously with several people.
If you do not use a tag manager, anyone who has access to your site’s code also has full rights to modify your analytical set up. In addition, simultaneous work on different codes is difficult. Allowing external entities such as advertising agencies to modify the code complicates the topic even more.

Google Tag Manager Container Permissions

4. Separating the implementation from the code layer

Thanks to the tag manager, we are able to separate the page code layer from the analytical implementation code. Changes to the analytical implementation can be implemented seamlessly without any need for changes to the page code. At the same time, it significantly increases the security of a website or application operation.
If you do not use a tag manager, it may happen that the analytical system will stop tracking data the next time the code is updated. This happens when, during changes to the page, previously implemented tracking codes were accidentally deleted, modified or are no longer compatible.

Google Tag Manger Code

5. Fixes and modifications

As in any project, at some point, you need to make changes or modifications. By using a tag management system, you have the opportunity to immediately check the results of your work and to implement changes. If something goes wrong it allows you to roll back to the previous version or easily correct your work.
If you do not use a tag manager, you must first prepare the documentation, delegate the job to developers, wait for implementation, test after implementation and often repeat this scheme many times, requiring much more time and money.

6. History of implementation

Another great feature of the tag manager is the ability to track the history of changes associated with a user and the ability to restore any previous version of the container.
If you do not use a tag manager, it’s much harder to verify who is responsible for specific implementation changes, who made them, and when exactly they occurred.

Google Tag Manager Workspace

7. Involvement of developers

Even in the case of more advanced analytical implementation, often the role of programmers is limited to embedding the container code on the page or passing data to the data layer. Then, thanks to the tag manager, the agile analyst is able to implement the entire analytical implementation.
If you do not use a tag manager, you have to engage programmers for even the simplest code implementations.

8. Ready integration

Not to be underestimated in the case of a tag manager is the possibility of using ready-made implementation templates or integration with other tools such as Google Optimize, Google Ads, Adform, Facebook, LinkedIn, Salesforce Hotjar and many others.
If you do not use a tag manager, you have to implement the integration manually from the code level.

9. Project management from A to Z

Very often programmers or developers involved in the implementation process do not have a sense of the subject of web analytics. It is ideal for project integrity when the person responsible for the analytical concept, its implementation, data interpretation, and reporting is a person with competence in the field of analytics. The use of a tag manager perfectly fits this strategy because it enables the analyst to be involved in every element of the analytical project, including its implementation.
If you do not use a tag manager, you need to rely on the developer’s experience and prepare accurate specifications for implementation, which always requires more work.

10. Project continuity

In the case of a change in the team supporting the analytical project, both within the company and in external entities, there is no major problem with continuing the previous work, because everything is implemented within the tag manager.
If you do not use a tag manager, a new team or a new service provider may have a serious problem finding themselves in implementations implemented from the code level if there was no reliable documentation for it.

Read also: The Future Of Frontend Frameworks

Business reasons for a tag manager

So why should we decide from a business perspective on a tag management system if we are thinking about implementing analytics or other external codes?

  • time – using a tag management system reduces the time needed for an analytical implementation.
  • money – by using fewer programmers’ time and shortening the entire process, we save a lot of resources
  • security and reliability – using a tag manager we are less exposed to the loss or incorrect measurement of data.
  • integration – the ability to integrate with other tools in a few moments thanks to the use of ready-made solutions

Who is a tag manager primarily for?

A tag manager will be of great use wherever we go beyond the basic implementation scheme. Especially in projects where:

  • more people or external entities are involved in the project
  • we have an extensive project structure which consists of many related but independent parts managed centrally
  • the project is regularly updated and it is highly advisable to separate the code layer from the analytical layer
  • we cannot afford any lack of data continuity and we care about the security and reliability of data
  • we use external integration

A perfect example of a tag manager project where we as Artegence have the opportunity to cooperate is the Oriflame e-commerce websites. For this project, the implementation of analytics using Tag Manager was a great decision. For a company that operates in 60 countries around the world and works with many external entities, Tag Manager is an ideal tool to enable the entire process of analytical implementation to run smoothly, and everyone has a specific place and task in it.

If after reading this article you still decide to implement analytical codes in the old fashioned way, please let me know why 😉 (pulacha@artegence.com)

Read also: 13 useful insights on how to better perform as a Car Dealer using Google Analytics

Let's make a great project together

Estimate project
Our website uses cookies. You can change the rules for their use or block cookies in the settings of your browser. More information can be found in the Privacy Policy. By continuing to use the website, you agree to the use of cookies.