Type safe code, unit tests and CI
Guides
Start Using Inspector with Avo Codegen

Getting started to use Inspector alongside Avo Codegen

You need to do minor setup to enable Codegen to start reporting to Avo Inspector.

Common steps for all platforms:

  1. Avo Inspector should be enabled for given source. To verify, learn more about how to configure Inspector sources.

  2. Your Avo generated file should use Avo version 63.10.0 or greater. You can find the version in the comment at the top of the generated file. If the version is older than 63.10.0 run avo pull again.

Platform specific setup:

iOS

Codegen on iOS automatically report to Avo Inspector since Avo version >= 63.10.0 and Inspector SDK version >= 1.2.0.

Make sure AvoInspector dependency in your podfile is equal or greater than 1.2.0.

You can use your own separate instance of Avo Inspector as described here (opens in a new tab) to analyze your tracking outside of Codegen, it will report the data correctly alongside Codegen.


Android

To enable Codegen to report to Avo Inspector automatically you would need to provide an instance of Avo Inspector, check the quick start guide for how to create one (opens in a new tab), when initializing Avo and use Avo version >= 63.10.0 and Avo Inspector SDK version >= 1.2.0.

Make sure com.github.avohq:android-avo-inspector dependency in your build.gradle file is equal or greater than 1.2.0.

Generated Avo file exposes avoInspectorApiKey constant that contains your Inspector API key.

This is how your Avo initialization code should look like:

import app.avo.inspector.AvoInspector
import app.avo.inspector.AvoInspectorEnv
 
val inspector = AvoInspector(avoInspectorApiKey,
    application, AvoInspectorEnv.Dev)
 
Avo.initAvoWithInspector(inspector, ...)
import app.avo.inspector.AvoInspector;
import app.avo.inspector.AvoInspectorEnv;
 
AvoInspector inspector = new AvoInspector(StaticAvo.avoInspectorApiKey, getApplication(), AvoInspectorEnv.Dev);
 
Avo.initAvoWithInspector(..., inspector);

You can use the same instance of Avo Inspector to analyze your tracking outside of Codegen, it will report the data correctly alongside Codegen.


Web

To enable Codegen to report to Avo Inspector automatically you provide an instance of Inspector when initializing Avo. This requires Avo version >= 63.10.0 and Avo Inspector SDK version >= 1.2.0. Check the quick start guide for how to create an Avo Inspector instance (opens in a new tab).

avo-inspector dependency in your package.json file should be equal or greater than 1.2.0.

Generated Avo file exposes avoInspectorApiKey constant that contains your Inspector API key.

This is how your Avo initialization code should look like:

const Inspector = require("avo-inspector");
 
const inspector = new Inspector.AvoInspector({
  apiKey: Avo.avoInspectorApiKey,
  env: Inspector.AvoInspectorEnv.Dev,
  version: "1.0.0",
  appName: "My App"
});
Avo.initAvo( { env: "dev", inspector: inspector}, ...);
import * as Inspector from "avo-inspector";
 
const inspector = new Inspector.AvoInspector({
  apiKey: Avo.avoInspectorApiKey,
  env: Inspector.AvoInspectorEnv.Dev,
  version: "1.0.0",
  appName: "My App"
});
Avo.initAvo({ env: Avo.AvoEnv.Dev, inspector: inspector }, ...);

You can use the same instance of Avo Inspector to analyze your tracking outside of Codegen, it will report the data correctly alongside Codegen.


Node

To enable Codegen to report to Avo Inspector automatically you provide an instance of Inspector when initializing Avo. This requires Avo version >= 71.34.0 and Avo Inspector SDK version >= 0.1.0. Check the quick start guide for how to create an Avo Inspector instance (opens in a new tab).

node-avo-inspector dependency in your package.json file should be equal or greater than 0.1.0.

Generated Avo file exposes avoInspectorApiKey constant that contains your Inspector API key.

This is how your Avo initialization code should look like:

const Inspector = require("node-avo-inspector");
 
const inspector = new Inspector.AvoInspector({
  apiKey: Avo.avoInspectorApiKey,
  env: Inspector.AvoInspectorEnv.Dev,
  version: "1.0.0",
  appName: "My App"
});
Avo.initAvo( { env: "dev", inspector: inspector}, ...);
import * as Inspector from "node-avo-inspector";
 
const inspector = new Inspector.AvoInspector({
  apiKey: Avo.avoInspectorApiKey,
  env: Inspector.AvoInspectorEnv.Dev,
  version: "1.0.0",
  appName: "My App"
});
Avo.initAvo({ env: Avo.AvoEnv.Dev, inspector: inspector }, ...);

You can use the same instance of Avo Inspector to analyze your tracking outside of Codegen, it will report the data correctly alongside Codegen.


React Native

To enable Codegen to report to Avo Inspector automatically you provide an instance of Inspector when initializing Avo. This requires Avo version >= 63.10.0 and Avo Inspector SDK version >= 1.2.0. Check the quick start guide for how to create an Avo Inspector instance (opens in a new tab).

react-native-avo-inspector dependency in your package.json file should be equal or greater than 1.2.0.

Generated Avo file exposes avoInspectorApiKey constant that contains your Inspector API key.

This is how your Avo initialization code should look like:

const Inspector = require("react-native-avo-inspector/dist-native");
 
const inspector = new Inspector.AvoInspector({
  apiKey: Avo.avoInspectorApiKey,
  env: Inspector.AvoInspectorEnv.Dev,
  version: "1.0.0",
  appName: "My App"
});
Avo.initAvo( { env: "dev", inspector: inspector}, ...);
import * as Inspector from "react-native-avo-inspector/dist-native";
 
const inspector = new Inspector.AvoInspector({
  apiKey: Avo.avoInspectorApiKey,
  env: Inspector.AvoInspectorEnv.Dev,
  version: "1.0.0",
  appName: "My App"
});
Avo.initAvo({ env: Avo.AvoEnv.Dev, inspector: inspector }, ...);

You can use the same instance of Avo Inspector to analyze your tracking outside of Codegen, it will report the data correctly alongside Codegen.