The GDDL framework

The GDDL is an event-based tracking framework for websites and web applications. The framework is vendor agnostic and relies on JavaScript libraries and the concept of HTML data attributes.

Building blocks

The Generic Digital Data Layer (GDDL) framework is built with Vanilla JavaScript and HTML Data Attributes, both basic front-end development concepts and supported across almost all browsers.

The building blocks of the GDDL are: two JavaScript libraries, events implemented within the components of the CMS, translator scripts and a tag manager.

AnalyticsTracker & Mediator

AnalyticsTracker is a client-side JavaScript module that handles the implemented events. This library depends on Mediator.js, a simple class that allows you to register, unregister, and call subscriber methods to help event-based, asyncronous programming.

The purpose of Mediator.js is to make the usage of WebSockets, Ajax calls, DOM events, or any other asynchronous operations easy to maintain and test. Analyticstracker relies on Mediator to queue all the events and dispatch them to the relevant translator scripts (=subscribers).

AnalyticsTracker is delivered as a vanilla JavaScript library and can be loaded with most popular loading frameworks. Proper integration into the website code is necessary to have the framework running correctly. This includes setting up tracking, generating events etc. This integration depents on the technology used on the website. It is possible to adapt or rewrite the core code in function of the used technology. GDDL is more a pattern then a black box implementation solution.

Note that Mediator.js is NOT part of the GDDL framework itself. It is an open-source library created by @ajacksified. ➡️ Read all about Mediator.js.

Events

We define objects or components to have events and tracking information, embedded in the HTML code.

The development team can once develop generic principles for reading the attributes and passing them through the event chain at the right moment, on the right interaction. This makes the implementation semi data driven, and relieve the development team.

We define objects or components to have events and tracking information, embedded in the HTML code. This information can be added at the templating level in the back-end of the CMS. So no or minimal need for manual customizations by the content manager.

We can take analytics data abstraction one step beyond the programming level. We can attribute analytics data on the content level. This will make the operational team (content managers / web analysts) responsible for the contents of the analytics. The development team can once develop generic principles for reading the attributes and passing them through the event chain at the right moment, on the right interaction. This makes the implementation semi data driven, and relieve the development team. We define objects or components to have events and tracking information, embedded in the HTML code. This information can be added at the templating level in the back-end of the CMS. So no or minimal need for manual customizations by the content manager.

Translator

The framework uses a separation layer, based on a messaging system: events are emitted in a standardized format and mechanism (JavaScript mediator or observer pattern with JSON object event structure), and in second stage translated by a custom generic component to a vendor specific data layer implementation.

Tag Management System

The basics of the methodology is separating the implementation of web analytics from the tools used for measuring. Good web analytics are based on consistent and qualitative implementation of a data layer on the web site. However, this data layer must be flexible enough to support new and / or different implementation technologies, and it should not lock-in a specific vendor based analytics or tag management system. On the other side, vendor specific implementations are still the most accurate, easy to configure and best performing solutions.

The framework will use a separation layer, based on a messaging system to overcome this problem. Events are emitted in a standardized format and mechanism (JavaScript mediator or observer pattern with JSON object event structure), and in second stage translated by a custom generic component to a vendor specific data layer implementation.

Data Attributes

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Last updated