Getting started to implement tracking plan changes in code with Avo
Data design on an Avo branch has been finished and it's time to implement new tracking in code.
First of all we recommend to open your Avo workspace and navigate to the branch you are about to implement, click View changes in the sidebar to access the diff for the changes in the branch. The diff is split in two, Tracking Plan Changes and Code Changes. The Tracking Plan Changes view is a summary of all changes to the items in the tracking plan and the Code Changes View represents the necessary code changes to start sending data according to the updated tracking plan.
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 code changes view to ask for any clarification before starting to implement.
Read more on the branch changes view.
Install the Avo CLI (opens in a new tab)
npm install --save-dev avo
npm install -g avo
Authenticate the Avo CLI with your Avo user:
Now you can pull your custom tracking snippet from your Avo workspace using Codegen.
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.jsonfile, containing a pointer to your Avo workspace, source and current branch. This file should be checked into git along with Codegen file.
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
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 code bases we recommend you to read the Multiple sources on Avo branches guide.
Once you are finished with implementing the code and your source control branch was merged remember to also merge the Avo branch!