Release 0.0.15: Tracker Validation while developing

Ivar Pruijn

We've released Objectiv v0.0.15, which enables validation of data at the first step of the pipeline: the Tracker.

Objectiv already ensures your tracking is valid according to the open analytics taxonomy in two places:

  1. Your IDE, with inline documentation & linting for validation issues (unknown calls & missing or wrongly typed properties), through TypeScript definitions.
  2. The Collector, which is Objectiv's backend for receiving & storing Events.
Objectiv validation in your IDE

Objectiv validation in your IDE

This release adds a third place for validation, as you're developing: the Tracker. This ensures you track the right data even before sending it, and you get useful help messages to easily fix any issues.

It also means you can now implement tracking without the need to run the Collector.

How it works

When you run your application, any validation errors are displayed in the browser's console, with pointers on how to easily fix it.

For example: the open analytics taxonomy requires tracked Events to carry a so-called Location Stack, which captures the exact UI location where the event was triggered (more on how & why in this blog post). A core Location Context is the RootLocationContext, which uniquely represents the top-level UI location of the user, e.g. an 'About Us' page.

If you try to track an Event that’s missing this required RootLocationContext, here’s how the new validation reporting now shows an error in the browser console:

Objectiv validation in your browser's console

Objectiv validation in your browser's console

Besides checking if required Contexts are there, it also checks if they’re unique, and in the right position in the stack.

Write your own

As the validation system is modular, it’s possible to write your own Plugins with custom validation logic or generic rules. You could for instance run these in unit tests/CI, as you no longer need the Collector.

What's next?

This is a first step, and more advanced validation will be introduced in the near future, such as:

  • Validating if the right Context as defined in the taxonomy is sent with any Event.
  • Providing even more useful error messages, e.g. with a link to documentation pages.
  • Pinpointing what happened where & why, as the Tracker has more state (e.g. pages, sessions, user behavior) and info about the environment & UI.

How to get the new features

All tracker SDKs are updated on NPM; pull the latest (currently version 0.0.16) to automatically get the new validation features. Check out the release notes for any important changes if you're already using the tracker.

Enjoy the new validation features!

Try Objectiv

Get Objectiv Up - Try Objectiv on your local machine (takes 5 minutes)
Objectiv on GitHub - Check out the project and star us for future reference
Objectiv on Slack - Join the discussion or get help