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, switch to the changes view and familiarize yourself with the changes happening.
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.
Install the Avo CLI locally in your project, using NPM or Yarn:
TerminalCopynpm install --save-dev avo
TerminalCopyyarn add --dev avo
or globally on your system, using NPM or Yarn:
TerminalCopynpm install -g avo
TerminalCopyyarn global add -E avo
Authenticate the Avo CLI with your Avo user:
TerminalCopyavo login
Now you can pull your custom tracking snippet from your Avo workspace using Codegen.
TerminalCopyavo 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.
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.
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.
Once you are finished with implementing the code and your source control branch was merged remember to also merge the Avo branch!