Getting started to implement tracking plan changes in code with Avo

2 minute read

Data design on an Avo branch has been finished and it's time to implement new tracking in code.

Familiarize yourself with the changes

First of all we recommend to open your Avo workspace and navigate to the branch you are about to implement, switch to the changes view and familiarize yourself with the changes happening.

Connections configuration
Press `View changes` button

It's really valuable to understand what exactly needs to be tracked and clear all unknowns.

We suggest using comments in the changes view to ask for any clarification before starting to implement.

Connections configuration
Figure out all the details before starting to implement

Pull the new code with Avo CLI

Install the Avo CLI

Install the Avo CLI locally in your project, using NPM or Yarn:

Terminal
Copy
npm install --save-dev avo
Terminal
Copy
yarn add --dev avo

or globally on your system, using NPM or Yarn:

Terminal
Copy
npm install -g avo
Terminal
Copy
yarn global add -E avo

Authenticate the Avo CLI with your Avo user:

Terminal
Copy
avo login

Now you can pull your custom tracking snippet from your Avo workspace using Codegen.

Terminal
Copy
avo pull --branch your_branch_name [SourceName]

When you run Avo pull for the first time it will also initialize Avo in your project by adding an avo.json file, containing a pointer to your Avo workspace, source and current branch. This file should be checked into git along with Codegen file.

Implement new events

Now your Avo file will have the changes from the your_branch_name branch. Call all the new Avo Codegen functions in required places, update the new event properties. You can find a reference of all the code snippets required to implement your events in the Codegen tab.

Connections configuration
Codegen reference

It might be useful to check the changes tab in your Avo workspace for overview while implementing.

If you are implementing the branch in multiple codebases we recommend you to read the Multiple sources on Avo branches guide.

The most important part

Once you are finished with implementing the code and your source control branch was merged remember to also merge the Avo branch!