Eventvisor

Advanced

Tags

Tagging your entities like events, attributes, destinations, and effects helps you generate targeted datafiles for your applications.

The more targeted the datafiles are, the smaller they are in size, and the faster they are loaded by your applications.

Tagging events

For e.g., when defining an event, you can add a tag like this:

events/pageView.yml
# ...
tags:
- web

The same is applicable to all other entities equally.

Project configuration

Your project configuration lists all the tags that are available for your entities:

eventvisor.config.js
module.exports = {
tags: [
"web",
"mobile",
"backend",
],
};

Datafiles

Based on the project configuration, Eventvisor will generate datafiles for each tag:

Command
$ npx eventvisor build

Output:

Directory structure
datafiles/
├── eventvisor-tag-web.json
├── eventvisor-tag-mobile.json
└── eventvisor-tag-backend.json

Each tagged datafile will only contain the entities that are tagged with the corresponding tag.

This helps cross-team collaboration yet centralizing the definitions of all entities in one single place, and still ensuring that the datafiles stay small and fast to load for individual applications.

Previous
Environments