Getting started to use Inspector alongside Avo Functions

4 minute read

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

Common steps for all platforms:

  1. Avo Inspector should be enabled for given source. Open the Inspector tab in the side menu in your Avo workspace, then press "Manage Sources" button at the top, choose your source from the grid and wait until you see the API Key. Once the API Key appears you source is considered Inspector-enabled.

  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

Avo Functions 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 to analyze your tracking outside of Avo Functions, it will report the data correctly alongside the Avo Functions.


Android

To enable Avo Functions 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, 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:

Kotlin
Copy
1
2
3
4
5
6
7
import app.avo.inspector.AvoInspector
import app.avo.inspector.AvoInspectorEnv
val inspector = AvoInspector(avoInspectorApiKey,
application, AvoInspectorEnv.Dev)
Avo.initAvoWithInspector(inspector, ...)
Java
Copy
1
2
3
4
5
6
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 Avo Functions, it will report the data correctly alongside the Avo Functions.


Web

To enable Avo Functions to report to Avo Inspector automatically you provide an instance of the 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.

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:

JavaScript
Copy
1
2
3
4
5
6
7
8
9
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}, ...);
TypeScript
Copy
1
2
3
4
5
6
7
8
9
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 Avo Functions, it will report the data correctly alongside the Avo Functions.


Node

To enable Avo Functions to report to Avo Inspector automatically you provide an instance of the 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.

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:

JavaScript
Copy
1
2
3
4
5
6
7
8
9
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}, ...);
TypeScript
Copy
1
2
3
4
5
6
7
8
9
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 Avo Functions, it will report the data correctly alongside the Avo Functions.


React Native

To enable Avo Functions to report to Avo Inspector automatically you provide an instance of the 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.

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:

JavaScript
Copy
1
2
3
4
5
6
7
8
9
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}, ...);
TypeScript
Copy
1
2
3
4
5
6
7
8
9
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 Avo Functions, it will report the data correctly alongside the Avo Functions.