Unlock your business potential.
Get in touch now! ›
Our latest posts on digital marketing.
Access to guides, case studies, webinars & more.
Develop your knowledge at your own pace with Mapp learning tools!


“Single Line of Code”: Agile Analysis of User Behavior

“Single Line of Code”: Agile Analysis of User Behavior

A company’s website serves as its central point of interaction with customers. To keep website usability high while improving evaluation of the way the processes are used by website visitors, it is necessary to gather user data to assess and manage website design. This data collection process can be optimized by using a novel implementation procedure, which renders the process of gathering user data on websites both fast and highly flexible. At the same time, data collection is bundled, modeled, and managed within a centralized tool. Apart from entering a single line of JavaScript code at the beginning of the process, no additional changes or maintenance to tracking functions in the website source code is required, making it possible to continue collecting data regardless of release status. In the area of analysis, Mapp Intelligence is an effective solution for such tasks.

What Does “Single Line of Code” Mean and How Does It Work?

“Single Line of Code” refers to a basic approach for integrating tracking functions on websites, single page applications, communities, and intranets, regardless of the particular tools used for any given application. Using this approach, a single line of JavaScript code is integrated into the source text of the website. The line of code is best understood as a dynamic library. This library is used both to load the tracking functions that have been modeled in a tag management tool as well as to provision collected user data. In addition to tracking functions, Mapp Intelligence also provides a powerful dashboard engine to enable precise, sophisticated data analysis. This approach enables each tracking function to be implemented locally without any changes to the source code or release updates on the website itself. In addition, tracking functions can be modeled in the tag management system and tracker go-live managed effectively.



What Kinds of Usage Data Can Be Measured Using This Approach?

This new integration approach can be used to measure all types of website use and display this data in a uniform structure. Usage data includes the following:

Page tracking
– Measurement of the number of page visits: How often are users accessing my website?
– Measurement of the scroll depth of a user on all pages: How far down are users scrolling on my website? Are they seeing content blocks located at the end of the page?
– Measurement of the number 404-page visits: Did the user land on a 404-page via an external link or a clickable element on the website itself? Where is the erroneous URL that linked to the 404-page?

Action tracking
– Measurement of the number of total clicks on interactive elements (e.g. teasers, buttons, images, text elements): How often are users clicking on my on-site campaigns? How are they using my navigation elements?
– Measurement of user interactions with entry fields in form paths. This analysis can differentiate between edited, empty, and error-producing fields (mandatory fields that cause the page to reload when filled out incorrectly): Which form fields are not being seen by users and therefore impeding website usability? Which form fields are most likely to be filled out incorrectly?
– User segmentation based on form fields: How many women versus men begin a particular process? Which of my target groups are most or least likely to complete a particular website process?

Search tracking
– Measurement and display of internal search processes: How often are users using the search function? Which search phrases are most common? Which search phrases fail to yield results?

Video tracking
– Measurement of interactions with video elements: Which videos are users most likely to watch through to the end? Which videos are users most likely to stop in the middle?

Process and eCommerce tracking
– Detailed measurement of website processes and applications of varying complexity (logins, contact requests, registrations, downloads, different types of application paths): How often are users beginning or completing my website processes? Where are the most common places for users to terminate processes they have begun?
– Mapping of an eCommerce process over different page paths for user segmentation and monetized evaluation of the conversion rate, both in eCommerce and non-eCommerce contexts: How much revenue have I generated for a particular product? How many newsletter subscriptions did I generate, and what monetary benefit does that represent for my company?
– Measurement and differentiation of error pages in form paths. The form page reloads following an erroneous entry in a form field. This page contains a separate identifier which distinguishes it from the previous (same) page: Which pages in my form path or shopping cart process make it most difficult for users to complete the process? How can I make the process easier in order to minimize the barriers to conversion?

Data protection
– Control of tracking elements related to data protection (e.g. consent banners): This approach enables the website operator to respond quickly to socio-political changes and influences, regardless of the website’s release status.

What Are the Advantages of This Approach?

The “Single Line of Code” approach provides a high level of transparency regarding the use of different types of digital channels and is slimmer, faster, and better than other approaches. Thanks to centralized bundling of tracking modeling in the tag management system, this approach generates a central data structure that operates independently of any changes to the source code on the page. The procedure enables collected data to be compared and eliminates the risk of integrating any heterogeneous tracking approaches in the source code which might result in inconsistent data. This provides a valid basis for interpreting gathered data and thereby developing measures to aid in website optimization.

It also offers procedural advantages for the initial integration of tracking functions and expansion of existing tracking protocols, saving on developer resources. Ultimately, developers need only plan and integrate one line of code to handle website tracking. This simplifies and streamlines communication between the development and tracking teams and reduces wait times associated with implementation and bug fixes. In addition, thanks to bundling and uniform allocation of tracking-related issues to tracking experts, the process of integrating and adapting tracking procedures is rendered faster, and less susceptible to potential integration errors which could affect website performance. It also eliminates the need for laborious testing of tracking solutions. Tests can be carried out directly on the live system. At the same time, changes and bug fixes do not require extensive workflows and communication between development and tracking experts.

All in all, the “Single Line of Code” approach provides an agile method for integrating tracking extensions. Such extensions can be modeled using an existing tag management system, tested, and set to go live, regardless of the current release cycle.

“Our ‘Single Line of Code’ approach offers a simple method for assessing performance over a range of different digital channels. That way, our customers can respond more quickly and effectively. In terms of analysis, with Mapp Intelligence we have a solution fulfilling highest expectations.”

– Ulf Kossol, Head of People Experience for the T-Systems Multimedia Solutions GmbH

Download the case study
Recent Articles