Implement analytics events
Avo provides a set of developer tools to make it faster and less error prone to implement tracking code. Avo Codegen, our type safe analytics wrappers, are one of those tools. Using Avo’s developer tools is optional, but something we highly recommend.
In this guide we’ll cover how to implement analytics events with and without using Avo’s developer tools.
Using journeys as implementation guides
If a journey was created during the planning phase, use the journey builder together with the Branch Code Changes screen as a visual guide during implementation. The journey builder shows the screens in context with the events, triggers, and property conditions, making it easy to understand exactly which events need to be triggered on each screen and what properties should be sent.
This visual context is particularly helpful when:
- Understanding where in the user flow each event should be triggered
- Seeing which properties and values are expected for each trigger
- Coordinating implementation across multiple screens or components
The journey builder with the Branch Code Changes screen provides a visual context for the implementation, making it easy to understand exactly which events need to be triggered on each screen and what properties should be sent.
Implementing without using Avo’s developer tools
You can continue implementing your tracking code like you are used to using analytics SDKs from analytics platforms (like Mixpanel, PostHog or Amplitude), SDKs from CDPs (like RudderStack, Segment or mParticle), or using internal built SDKs or APIs.
A typical implementation workflow looks like this:
- Review the changes - Open the journey in the journey builder and the Branch Code Changes screen side-by-side to review the code changes required to implement the journey.
- Open a git branch - Create a branch or use an existing branch with the product update that you are working on in your product’s codebase to implement your analytics tracking changes.
- Implement the changes - Use the code snippets from code changes screen as a task list and template for implementation and the journey as visual context for where each event belongs in the user flow.
Implementing with Avo Codegen
Avo Codegen produces type safe analytics wrappers that are code generated based on your tracking plan. Designed to speed up the tracking code implementation, while also making it more reliable with type-safety.
Learn more about Avo’s developer tools in Avo 101 for developers:
For teams that are using Avo Codegen to implement their tracking code, the typical implementation workflow looks like this:
- Review the changes - Open the journey in the journey builder and the Branch Code Changes screen side-by-side to review the code changes required to implement the journey.
- Open a git branch - Create a branch or use an existing branch with the product update that you are working on in your product’s codebase to implement your analytics tracking changes.
- Pull the updated Codegen - Use the Avo CLI to pull the updated code from the Avo branch you are implementing. You can find the Avo CLI command for each source in the top right corner of the branch review screen under “Branch Implementation”.
- Implement the changes - Use the type-safe functions provided by Avo Codegen to implement your events in your source code, using the code changes screen as a task list and the journey as visual context for where each event belongs in the user flow. The Codegen tab in your workspace provides documentation and code snippets for each event.
If Avo Codegen haven’t been set up in your project yet, learn how to set them up in our Avo Codegen quickstart guide: