Workflow
Projects
An Eventvisor project is ideally a separate repository from your application(s), where you manage various entities like events, attributes, and destinations.
Creating a project#
The easiest way is to use the Eventvisot CLI using npx
(Node.js).
Create a new project directory first:
$ mkdir my-project$ cd my-project
And inside the newly created directory, initialize an Eventvisor project:
$ npx @eventvisor/cli init
Installation#
Afterwards, install the dependencies:
$ npm install
Platform agnostic usage#
While Eventvisor CLI itself depends on Node.js, your applications do not need to.
The idea is that an Eventvisor project will generate datafiles (static JSON files), which will later be consumed by applications using SDKs in different programming languages which do not need to have any ties to Node.js in any way.
At the moment, only JavaScript SDK is supported, covering browser and Node.js applications. More SDKs will emerge as the open source project matures.
Directory structure#
$ tree ..├── attributes/│ ├── country.yml│ ├── deviceId.yml│ └── userId.yml├── datafiles/ (generated later)│ ├── production/│ │ └── eventvisor-tag-all.json│ └── staging/│ └── eventvisor-tag-all.json├── destinations│ └── browser.yml├── events│ └── pageView.yml├── eventvisor.config.js├── package.json└── tests ├── destinations │ └── browser.spec.yml └── events └── pageView.spec.yml
Project configuration#
eventvisor.config.js
: contains your project configuration. Learn more in Configuration page.
Building blocks#
These are the directories where you will be defining all the building blocks for managing the project:
attributes/
: contains all your attribute definitionsdestinations/
: contains all your destination definitionsevents/
: contains all your event definitionseffects/
: contains all your effect definitionstests/
: contains all your test specs against your attributes, events, destinations, and effects
Output#
datafiles/
: contains all your generated datafiles, which are meant to be consumed by SDKs in your applications
Git repository#
While it is intended that an Eventvisor project should be hosted in a separate standalone Git repository, it is not a strict requirement.
$ git init$ git add .$ git commit -m "Initial commit"
You can still use the CLI to manage your project without a Git repository, or as part of your larger application codebase (think a monorepo setup).
However, it is highly recommended to use a standalone Git repository to keep track of your changes and collaborate with others. Keeping it separate from your application codebase allows you to your configuration changes from your application code deployments.
Multiple projects#
If you wish to have multiple Eventvisor projects in a single Git repository, refer to the guide in monorepo page.