# Developer's overview of Avo

Avo offers three ways to validate your tracking implementation:

1.  [Avo Codegen: Type safe analytics wrappers](#avo-codegen-type-safe-analytics-wrappers)
2.  [Avo Inspector: Tracking observability](#avo-inspector-tracking-observability)
3.  [Avo Debuggers aka In-App Inspector: On device tracking verification](#avo-debuggers-aka-in-app-inspector-on-device-tracking-verification)

## Avo Codegen: Type safe analytics wrappers

### What is Codegen?

[Codegen](https://www.avo.app/docs/implementation/avo-codegen-overview.md) produces type safe analytics wrappers that are code generated based on your [tracking plan](https://www.avo.app/docs/data-design/avo-tracking-plan.md).

Technical or non-technical people can define analytics event schemas in the [Avo Tracking Plan](https://www.avo.app/docs/data-design/avo-tracking-plan.md),
and you can generate human readable type safe code based on that. The days of unstructured
and outdated tracking plan spreadsheets and Jira tickets are over 🥳 So are the days of brittle
analytics implementation you have to revisit to fix again and again and again 😌

### How does Codegen work?

Codegen produces type safe analytics wrappers that can work with any analytics tool, whether it's any of the third-party event logging SDKs (e.g.
Google Analytics 4, Segment, RudderStack, mParticle, Snowplow, Amplitude, Mixpanel, Pendo,
etc) or your home made API.

When designing the tracking plan you configure the list of analytics destinations for each source. In the generated code each destination is
represented as its own Destination Interface in the initAvo method of your Codegen. This is how Codegen routes data,
locally in your client (without the data ever going through Avo's servers), to the correct destination based on the source/destination connections
you've defined in the Avo dashboard.

In the [Avo Tracking Plan](https://www.avo.app/docs/data-design/avo-tracking-plan.md) you can configure which analytics [actions](https://www.avo.app/docs/data-design/avo-tracking-plan/events.md#actions)
should be triggered with an Avo Function (for example you might want to update user properties or log revenue along with logging an event), and Codegen
will handle calling all the relevant Destination Interface methods. All you have to do is call the Avo Function in your
code base and pass in type safe key-value pairs, and the Avo Function will take care of the rest.

Learn more technical details about [Codegen here](https://www.avo.app/docs/implementation/avo-codegen-tech-deep-dive.md).

### Do events flow through Avo servers?

No. None of your events ever go through Avo servers. They go directly from your devices (whether that's a front-end client or a server) to the analytics destination.

> 💡 This sometimes called "device mode". With CDPs, you can choose between [_Cloud-mode_ or _Device-mode_](https://segment.com/docs/guides/intro-impl/#connection-modes):
>
> - In _Cloud-mode_, your events go through the CDP servers. Your devices send the events to the CDP cloud (aka the CDP Servers) and the CDP cloud sends them to the analytics destinations.
> - In _Device-mode_ the events go directly from your devices (whether it's a front end client or a server) to the analytics destination.
> In this regard, Avo works like _Device-mode_.

## Avo Inspector: Tracking Observability

### What is Avo Inspector?

Avo Inspector is a tracking observability solution that's easy to install. Avo Inspector analyzes tracking calls made by your app and provides an overview of them in Inspector dashboard.

With Inspector, you get an instant audit of your current state of tracking, and an ongoing tracking observability going forward.

### How does Avo Inspector work?

Inspector API extracts the schemas (aka shapes) of the events you trigger (no PII data,
only event names, property names, and types of properties) and sends those schemas to
the Avo servers. To repeat: None of the PII data ever flows through Avo servers; only event schemas.

### How do I use Inspector?

You can view the overview of your current tracking in the [Inspector Issues View](https://www.avo.app/docs/inspector/inspector-issues-view.md) and you can connect Avo Inspector to a Slack channel to receive alerts when Inspector detects
a new issue that has not been seen in production for 30 days.

### How do I send data into Inspector?

You can send data into Inspector three ways:

1.  [Inspector SDKs](#inspector-sdks)
2.  [Connect with CDPs and analytics platforms](#connect-with-cdps-and-analytics-platforms)
3.  [Inspector API](#inspector-api) ([contact us to get access](https://www.avo.app/docs/help/troubleshooting.md))

#### Inspector SDKs

Inspector SDK can be plugged into your existing tracking – independent of whether
you're using Codegen or not.

##### Inspector SDK with your existing tracking

Inspector SDK is a stand-alone SDK which you can install with your package manager.
You can use Inspector SDK whether or not you adopt Codegen, by plugging the
Inspector SDK into the call site of your existing tracking. Most code bases
have some sort of a wrapper around calling their analytics SDKs, and that's where you
plug Inspector SDK.

##### Inspector SDK with Codegen

Initialize Codegen SDK with an instance of Inspector SDK.

#### Connect with CDPs and analytics platforms

You can pipe your analytics data into Inspector API via your CDPs or analytics providers:

- Segment: [Set Inspector up via Segment Functions](https://www.avo.app/docs/inspector/connect-inspector-to-segment.md)
- RudderStack: [Set Inspector up via RudderStack Functions](https://www.avo.app/docs/inspector/connect-inspector-to-rudderstack.md)
- PostHog: [Set Inspector up via PostHog Plugin](https://www.avo.app/docs/inspector/connect-inspector-to-posthog.md)
- Mixpanel: Coming soon.
- mParticle: Coming soon.

Reach out to support@avo.sh for early access to any of the platforms coming soon.

#### Inspector API

Coming soon: You can send data into Inspector API directly. Reach out to support@avo.sh for early access.

### Does Inspector receive PII data?

No. Inspector does not receive any PII data. Inspector only takes in event names,
property names, and types of properties.

Learn more technical details about the [Avo Inspector here](https://www.avo.app/docs/reference/avo-inspector-sdks/overview.md).

## Avo Debuggers aka In-App Inspector: On device tracking verification

Avo provides an [In-App Inspector](https://www.avo.app/docs/reference/avo-debuggers/overview.md) that shows you when you're triggering events, what the schemas are,
and whether they match the analytics event spec. The In-App Inspector is displayed via a small bubble
on your web or mobile app, which you can click into and see the details of the event structure.

When you implement analytics via the [Codegen](#avo-codegen-type-safe-analytics-wrappers), the In-App Inspector will not only show you
the timing and schema of your event, but also display a red warning or green check mark based on
whether or not your events fits the analytics spec in your Avo tracking plan.
