# Validate implementation

Avo provides a number of tools that help you verify that the events you’ve implemented are correct according to how you’ve defined them in your Avo Tracking Plan.

Avo’s validation functionalities are built on top of two product offerings, [Avo Inspector](https://www.avo.app/docs/inspector/start-using-inspector.md) and [Avo Codegen](https://www.avo.app/docs/implementation/avo-codegen-overview.md).

> 🔒 While Avo offers powerful tools for data quality monitoring and observability,
> Avo never receives or processes any PII data about the customers of Avo
> customers. Avo never receives or processes your actual analytics events, only
> the schemas.

## Validate implementation with Avo Inspector

For every source that has Inspector installed, you can validate if the implementation is according to the tracking plan using the [Inspector Debugger](https://www.avo.app/docs/inspector/inspector-debugger.md) for real-time validation during development and in staging and/or Inspector implementation status in your tracking plan. In addition you can use the [Inspector Issues view](https://www.avo.app/docs/inspector/inspector-issues-view.md) for production monitoring, to review and manage tracking plan violations in your production data for the past 24 hours.

If you don't have Inspector installed yet, you can learn more about how to get started with Inspector here:

- [Avo Inspector](https://www.avo.app/docs/inspector/start-using-inspector.md): Use Inspector to improve your tracking plan health

### Validate with Inspector Debugger

The [Inspector Debugger](https://www.avo.app/docs/inspector/inspector-debugger.md) is the recommended way to validate your tracking implementation during development and staging. It provides a real-time event stream that shows events as they're sent from your application, with immediate validation against your tracking plan on the current branch.

Here's how you can validate tracking implementation using the Inspector Debugger:

1. Head to the [Inspector Debugger](https://www.avo.app/schemas/default/inspector/debugger) in your workspace and switch to the branch you'd like to verify implementation for.
2. Filter by the environment you're testing in (Development or Staging) and the source you're triggering events from. Coming soon: Filtering down to your specific stream session too.
3. Trigger events in your application and watch them appear in real-time in the debugger.
4. Click on any event to see the complete property list and validation status. The debugger will highlight any [issues](https://www.avo.app/docs/inspector/issue-types-in-inspector.md) such as unexpected properties, type mismatches, or missing required properties.
5. If you've created a [journey](https://www.avo.app/docs/data-design/avo-tracking-plan/journeys.md), use it as a visual guide to verify that events are being triggered at the correct points and order in the user flow and that the properties are being sent according to the journey trigger property conditions.

![Inspector Debugger event details](https://www.avo.app/docs/images/inspector/debugger/inspector-debugger-event-details.png)

_Example: Inspector Debugger showing event details and validation status_

> Worth repeating here: Avo never receives or processes any of your actual analytics events, only the schemas. In other words, Avo never receives or processes any PII data about the customers of Avo's customers.

- [Inspector Debugger](https://www.avo.app/docs/inspector/inspector-debugger.md): Learn more about using the Inspector Debugger for real-time validation

### Validate with Inspector implementation status

For every source Inspector is installed on, you’ll find an implementation status in the Avo Tracking Plan. When looking at from which sources an event is sent from in your Tracking Plan you will notice green, yellow or red status indicator lights next to each source name. This is the implementation status.

You can hover over the source pill in the events table, or click into the event, to learn more about the implementation status.

Learn more about how to read Inspector implementation status:

- [Inspector implementation status](https://www.avo.app/docs/data-design/avo-tracking-plan/implementation-status.md#inspector-implementation-status)

## Validate implementation with Avo Codegen

For all tracking implemented with Codegen, you can validate if the implementation is according to the tracking plan using four methods, each with its own purpose.

If you’re not using Codegen already, you can learn more about how to get started here:

- [Quickstart: Codegen](https://www.avo.app/docs/implementation/start-using-avo-codegen.md): Start using Codegen

### Validate with type-safety and runtime validation

All tracking code implemented with Codegen is type-safe and has built in runtime validation. This gives the developer instant feedback on whether the tracking implementation is according to the tracking plan or not. Any type issues are surfaced by the code compiler, and runtime validations are surfaced via console logs and the Avo debugger.

Learn more about how validations in Codegen work here:

- [What's happening inside Codegen](https://www.avo.app/docs/implementation/avo-codegen-overview.md#whats-happening-inside-the-avo-codegen): Learn about how validations in Codegen work

### Validate with the Avo In-app Debugger

The Avo In-app Debugger is an addition on top of Avo Codegen that gives you better visibility into which events are being sent, which properties are attached, and whether any issues were detected or not.

![Web debugger example](https://www.avo.app/docs/images/web-debugger-example.png)

_Example: Web debugger example_

The Avo debugger is available on Web, iOS, Android and React Native. Learn more about the Avo debugger here:

- [Visual debuggers](https://www.avo.app/docs/implementation/guides/start-using-visual-debuggers.md): Learn about how Avo debugger works

### Validate with the Avo CLI

The Avo CLI has a command, `avo status`, that will report on where Avo Codegen is being called from, and which events have not been implemented yet.

We recommend adding the `avo status` check to your CI pipeline, and configure it to throw an error if an event that is supposed to be sent with Avo Codegen, is not found in the codebase.

```sh
> avo status
info Currently on branch 'main'
└─ java android (musicplayerexample/src/main/java/sh/avo/Avo.java)
   ├─ appOpened
   │  └─ used in musicplayerexample/src/main/java/app/avo/musicplayerexample/MusicPlayerExampleApplication.kt: 1 time
   ├─ login
   │  └─ ✖ no usage found
   ├─ logout
   │  └─ ✖ no usage found
   ├─ pause
   │  └─ used in musicplayerexample/src/main/java/app/avo/musicplayerexample/ExampleMusicPlayerActivity.kt: 1 time
   ├─ play
   │  └─ used in musicplayerexample/src/main/java/app/avo/musicplayerexample/ExampleMusicPlayerActivity.kt: 3 times
   ├─ playNextTrack
   │  └─ used in musicplayerexample/src/main/java/app/avo/musicplayerexample/ExampleMusicPlayerActivity.kt: 1 time
   └─ playPreviousTrack
      └─ used in musicplayerexample/src/main/java/app/avo/musicplayerexample/ExampleMusicPlayerActivity.kt: 1 time
info 5 of 7 events seen in code
error 2 missing events
└─ java android (musicplayerexample/src/main/java/sh/avo/Avo.java)
   ├─ login: no usage found
   └─ logout: no usage found
```

_Example: The `avo status` command in Avo CLI_

You can learn more about using the Avo CLI in CI/CD here:

{' '}

- [Avo in CI/CD](https://www.avo.app/docs/implementation/guides/avo-in-the-ci.md): How to use the Avo CLI in CI/CD

### Validate with implementation status in the tracking plan

For every source Avo Codegen is installed on, you’ll find an implementation status in the Avo Tracking Plan. When looking at from which sources an event is sent in your Tracking Plan you will notice green, yellow or red status indicator lights next to each source name. This is the implementation status.

You can hover over the source pill in the events table, or click into the event, to learn more about the implementation status.

![Hover the pill to see implementation status](https://www.avo.app/docs/images/workflow/5.validate/pill.png)

_Example: Implementation status in the event table of the tracking plan_

You can also find a branch implementation status for Avo Codegen in the top right corner of the branch review screen.

![Hover the pill to see implementation status](https://www.avo.app/docs/images/workflow/5.validate/event-implemented.png)

_Example: Implementation status on the branch review screen_

Learn more about how to read Avo Codegen implementation status:

- [Avo Codegen implementation status](https://www.avo.app/docs/data-design/avo-tracking-plan/implementation-status.md#avo-codegen-implementation-status): Learn how to read Avo Codegen implementation status

## What’s next?

- [6. Merge branch and Publish](https://www.avo.app/docs/workflow/merge-publish.md): Learn how to Merge branch and Publish your tracking plan updates to schema registries
