### Install Dependencies and Start Development Server Source: https://github.com/avohq/docs/blob/main/README.md Installs project dependencies and starts the local development server. Ensure Node.js 18 or later is installed. ```bash yarn # or "npm install" yarn dev # or "npm run dev" ``` -------------------------------- ### Example Request with Parameters Source: https://github.com/avohq/docs/blob/main/pages/reference/public-api/export-branch-stats.mdx This example demonstrates how to make a GET request to the export endpoint, specifying branch statuses and the desired response format. ```sh curl -X GET https://api.avo.app/workspaces/:workspaceId/branches/export/v1?branchStatuses=Approved,Closed&format=json ``` -------------------------------- ### Install Avo Inspector Go SDK Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/go.mdx Install the Avo Inspector Go SDK using the go get command. It's recommended to use the latest GitHub release tag for the most up-to-date version. ```bash go get github.com/avohq/go-avo-inspector ``` -------------------------------- ### Install the Avo CLI Source: https://github.com/avohq/docs/blob/main/pages/implementation/cli.mdx Install the Avo CLI globally using npm or yarn. After installation, verify the installation by checking the version. ```bash npm install -g avo ``` ```bash avo --version 1.3.6 ``` -------------------------------- ### Install Node.js Inspector SDK Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/node.mdx Install the node-avo-inspector library using npm. ```bash npm i node-avo-inspector ``` -------------------------------- ### Example Event Schema Return (Swift) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for the returned event schema in Swift. ```swift let eventSchema: [String : AvoEventSchemaType] = [ "userId": AvoInt(), "emailAddress": AvoString(), "key": AvoString() ] ``` -------------------------------- ### Example Event Properties (Swift) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for event properties when tracking schemas in Swift. ```swift let eventProperties: [String : Any] = [ "userId": 1337, "emailAddress": "jane.doe@avo.app", "key": "value" ] ``` -------------------------------- ### Install Avo CLI Globally Source: https://github.com/avohq/docs/blob/main/pages/implementation/guides/start-implementing-tracking-changes.mdx Install the Avo CLI globally on your system using NPM or Yarn. ```bash npm install -g avo ``` -------------------------------- ### Example Event Schema Return (Objective-C) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for the returned event schema in Objective-C. ```objectivec NSDictionary *eventSchema = @{ @"userId": [AvoInt new], @"emailAddress": [AvoString new], @"key": [AvoString new] }; ``` -------------------------------- ### Example Event Properties (Objective-C) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for event properties when tracking schemas in Objective-C. ```objectivec NSDictionary *eventProperties = @{ @"userId": @1337, @"emailAddress": @"jane.doe@avo.app", @"key": @"value" }; ``` -------------------------------- ### Example Event Schema Return Format Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/go.mdx This is an example format for the returned event schema, which contains property names, types, and children. ```go []Property{ { PropertyName: "greeting", PropertyType: "string", Children: nil, }, { PropertyName: "answer", PropertyType: "int", Children: nil, } } ``` -------------------------------- ### Install AvoInspector with CocoaPods Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Add this line to your Podfile to install the AvoInspector library using CocoaPods. ```ruby pod 'AvoInspector' ``` -------------------------------- ### Example Event Data Source: https://github.com/avohq/docs/blob/main/pages/faqs/inspector-faq.mdx This example shows the structure of event data sent from an application, including event name and properties with their values. ```json "eventName": "Checkout Completed", "properties": { "User Id": 1337, "Email Address": "jane.doe@avo.app", "Product Id": 45, "Revenue": 15.99 } ``` -------------------------------- ### Install Avo CLI Locally Source: https://github.com/avohq/docs/blob/main/pages/implementation/guides/start-implementing-tracking-changes.mdx Install the Avo CLI as a development dependency in your project using NPM or Yarn. ```bash npm install --save-dev avo ``` -------------------------------- ### Example Event Properties Format Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/go.mdx This is an example format for event properties, which are used to construct the event schema sent to Avo. ```go map[string]interface{}{ "greeting": "hello", "answer": 42, } ``` -------------------------------- ### Install Avo CLI Globally with Yarn Source: https://github.com/avohq/docs/blob/main/pages/implementation/start-using-avo-codegen.mdx Install the Avo CLI globally on your system using Yarn. This makes the 'avo' command available system-wide. ```sh yarn global add avo ``` -------------------------------- ### Install React Native Avo Inspector Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/react-native.mdx Install the Inspector library using npm. This command adds the necessary package to your project. ```bash npm install react-native-avo-inspector ``` -------------------------------- ### CSV Import Request Body Example Source: https://github.com/avohq/docs/blob/main/pages/reference/public-api/import-tracking-plan.mdx Example of the content expected for a CSV import. Refer to the importing documentation for the exact format. ```text Your CSV content following the format described in the [importing documentation](/publishing/import/importing) ``` -------------------------------- ### Developer Mode Code Snippets Example Source: https://github.com/avohq/docs/blob/main/pages/data-design/avo-tracking-plan/journeys.mdx An example illustrating how Developer mode displays code snippets, reflecting property conditions for specific trigger scenarios. ```markdown ![Developer mode code snippets](/images/journeys/journeys-property-conditions-code-snippets.png) ``` -------------------------------- ### Initialize Avo in PHP Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/php.mdx Import Avo and initialize it with environment options and system properties before tracking events. The actual parameters depend on your tracking plan setup. ```php require_once 'avo.php'; Avo::init_avo(array("env" => "dev" /*, other parameters depending on your tracking plan setup*/), [$system_properties]); ``` -------------------------------- ### Initialize Avo in Python Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/python.mdx Import Avo and initialize it with environment options before tracking events. The parameters depend on your tracking plan setup. ```python import avo avo.init_avo({'env': 'dev'}, ...) ``` -------------------------------- ### Get DebuggerManager Instance Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Gets the instance of DebuggerManager for visual inspection. ```APIDOC ## Get DebuggerManager Instance ### Description Gets the instance of DebuggerManager for visual inspection. In the `:dev` dependency the returned object is a nullable `DebuggerManager`. In the `:prod` dependency it always returns null. ### Java ```java @Nullable Object getVisualInspector(); ``` ### Kotlin ```kotlin fun getVisualInspector(): Object? ``` ### Returns - **Object?** - The DebuggerManager instance or null. ``` -------------------------------- ### Avo CLI Help Reference Source: https://github.com/avohq/docs/blob/main/pages/implementation/cli.mdx Display the complete documentation for all available Avo CLI commands and options. Use this to understand the full range of functionalities. ```bash avo --help ``` ```bash avo command ``` -------------------------------- ### JWT Header Example Source: https://github.com/avohq/docs/blob/main/pages/publishing/webhook-signing.mdx This is an example of the JWT header used in webhook requests. ```json { "alg": "HS256", "typ": "Jwt" } ``` -------------------------------- ### Initialize Avo with System Properties (Java Reference) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/java.mdx Reference for the `initAvo` method in Java, showing parameters for environment, system properties, custom destinations, and initialization flags. Application and context are also required. ```java public static void initAvo(AvoEnv env, // Other parameters may not be present, depending on your tracking plan Integer systemProperty0, Boolean systemProperty1, ICustomDestination mixpanelDestination, ICustomDestination segmentDestination, ICustomDestination otherDestination, boolean strict = true, boolean noop = false, application: Application, context: Context ); ``` -------------------------------- ### Example Event Properties (Kotlin) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Example of how to construct JSONObject for event properties in Kotlin. ```kotlin val eventProperties = JSONObject().apply { put("userId", 1337) put("emailAddress", "jane.doe@avo.app") put("key", "value") } ``` -------------------------------- ### Example Event Properties Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/node.mdx An example of the structure for event properties when tracking an event schema. ```javascript var eventProperties = { userId: 1337, emailAddress: 'jane.doe@avo.app', key: 'value', }; ``` -------------------------------- ### Destination Interface Example Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/ruby.mdx This is an example of a destination interface used with Avo Codegen in Ruby. ```ruby ```ruby ``` -------------------------------- ### Avo Constructor Initialization (Swift) Source: https://github.com/avohq/docs/blob/main/pages/implementation/avo-codegen-tech-deep-dive.mdx Example of the constructor signature for initializing Avo in new workspaces. It includes environment, system properties, destinations, and debugger. ```swift public init(env: AvoEnv, requiredStringSystemProperty: RequiredStringSystemProperty, optionalStringSystemProperty: OptionalStringSystemProperty?, requiredIntSystemProperty: Int, optionalFloatSystemProperty: Double?, optionalListSystemProperty: [Int]?, firstDestination: AvoCustomDestination, secondDestination: AvoCustomDestination, debugger: NSObject, strict: Bool = false, noop: Bool = false) ``` -------------------------------- ### Legacy Avo Static Initialization and Event Tracking (Swift) Source: https://github.com/avohq/docs/blob/main/pages/implementation/avo-codegen-tech-deep-dive.mdx Demonstrates the legacy static pattern for initializing Avo and tracking events directly on the Avo class. ```swift Avo.initAvo(env: .dev/*, other parameters*/) Avo.eventName(/*event properties*/) ``` -------------------------------- ### Example Extracted Event Schema (Swift) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for an extracted event schema in Swift. ```swift let eventSchema: [String : AvoEventSchemaType] = [ "userId": AvoInt(), "emailAddress": AvoString(), "key": AvoString() ] ``` -------------------------------- ### Initialize Avo in JavaScript Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/javascript.mdx Import the Avo library from your generated file and initialize it with environment options before tracking any events. Additional parameters may be required based on your tracking plan setup. ```javascript import Avo from './Avo'; Avo.initAvo( { env: 'dev' }, /*, other parameters depending on your tracking plan setup*/ ); ``` -------------------------------- ### AvoInspector Constructor Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/react-native.mdx Initializes the AvoInspector with provided options. This is the first step to using the SDK. ```APIDOC ## AvoInspector Constructor ### Description Initializes the AvoInspector with provided options. This is the first step to using the SDK. ### Parameters #### Path Parameters - **apiKey** (string) - Required - The API key obtained from your Avo account. - **env** (AvoInspectorEnv) - Required - The current environment: "dev", "staging", or "prod". - **version** (string) - Required - Your application version. Recommended to use semantic versioning or incrementing integers. - **appName** (string) - Optional - Your application name. Useful for distinguishing data from different apps. ``` -------------------------------- ### Example Event Schema for trackSchema Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/java.mdx Provides an example of how to structure an event schema map for the trackSchema method. ```java Map eventSchema = new HashMap<>(); eventSchema.put("userId", new AvoEventSchemaType.AvoInt()); eventSchema.put("emailAddress", new AvoEventSchemaType.AvoString()); eventSchema.put("key", new AvoEventSchemaType.AvoString()); ``` -------------------------------- ### Initialize Avo in Ruby Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/ruby.mdx Import the generated Avo file and initialize Avo with environment options before tracking events. The specific parameters depend on your tracking plan setup. ```ruby require './avo.rb' Avo.init_avo(options: { env: :dev }, ...) # other parameters depend on your tracking plan setup ``` -------------------------------- ### Example Event Schema for trackSchema Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/react-native.mdx Provides an example of the event schema format expected by the trackSchema method. ```javascript var returnedSchema = [ { propertyName: 'userId'; propertyType: 'int'; }, { propertyName: 'emailAddress'; propertyType: 'string'; }, { propertyName: 'key'; propertyType: 'string'; }, ]; ``` -------------------------------- ### Example Usage: Successful Response Source: https://github.com/avohq/docs/blob/main/pages/reference/public-api/create-branch.mdx This shows the expected JSON response after successfully creating a branch using the API. ```json { "branchId": "abc123def", "branchName": "my-new-branch", "branchUrl": "https://avo.app/schemas/abcd/branches/abc123def" } ``` -------------------------------- ### Initialize Avo in ReasonML Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/reasonml.mdx Initialize Avo by importing and calling `initAvo` before tracking events. This sets up the environment and system properties. ```reasonml Avo.initAvo( ~env=`dev, ~systemProperties=Avo.AvoSystemProperties.t(), [~destinationOptions=?], [~mixpanelDestination=?], [~segmentDestination=?], [~otherDestination=?], () ); ``` -------------------------------- ### Example Processed Event Schema (Objective-C) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for a processed event schema in Objective-C, ready to be sent. ```objectivec NSDictionary *eventSchema = @{ @"userId": [AvoInt new], @"emailAddress": [AvoString new], @"key": [AvoString new] }; ``` -------------------------------- ### Example Processed Event Schema (Swift) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Example format for a processed event schema in Swift, ready to be sent. ```swift let eventSchema: [String : AvoEventSchemaType] = [ "userId": AvoInt(), "emailAddress": AvoString(), "key": AvoString() ] ``` -------------------------------- ### AvoInspector Constructor Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/java.mdx Initializes the AvoInspector with API key, app version, app name, and environment. ```APIDOC ## AvoInspector Constructor ### Description Initializes the AvoInspector instance. ### Method `AvoInspector(@NotNull String apiKey, @NotNull String appVersion, @NotNull String appName, @NotNull AvoInspectorEnv env)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **apiKey** (String) - Required - the API key you get in Inspector tab of your Avo workspace - **appVersion** (String) - Required - app version to attribute the events to - **appName** (String) - Required - application name - **env** (AvoInspectorEnv) - Required - current environment: AvoInspectorEnv.Dev, AvoInspectorEnv.Staging or AvoInspectorEnv.Prod ``` -------------------------------- ### Example Processed Event Schema (Kotlin) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Example of constructing a Map for the trackSchema method in Kotlin. ```kotlin val eventSchema = mutableMapOf().apply { put("userId", AvoInt()) put("emailAddress", AvoString()) put("key", AvoString()) } ``` -------------------------------- ### Initialize AvoInspector (Java) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Constructor signature for initializing AvoInspector in Java. Requires API key, application context, environment, and optionally an activity for the visual inspector and a public encryption key. ```java public AvoInspector(@NonNull String apiKey, @NonNull Application application, @NonNull AvoInspectorEnv env, @Nullable Activity rootActivityForVisualInspector, @Nullable String publicEncryptionKey) ``` -------------------------------- ### AvoInspector Initialization Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/dart.mdx Initializes the AvoInspector with your API key, environment, app version, and app name. ```APIDOC ## AvoInspector.create() ### Description Initializes the AvoInspector instance. ### Method `AvoInspector.create()` ### Parameters #### Parameters - **apiKey** (string) - Required - The API key obtained from your Avo Workspace. - **env** (AvoInspectorEnv) - Required - The current environment (`AvoInspectorEnv.dev`, `AvoInspectorEnv.staging`, or `AvoInspectorEnv.prod`). - **appVersion** (string) - Required - The version of your application. Recommended to use semantic versioning or incrementing integers. - **appName** (string) - Optional - The name of your application, used for distinguishing data from different apps. ### Request Example ```dart AvoInspector avoInspector = await AvoInspector.create( apiKey: "my_key", env: AvoInspectorEnv.dev, appVersion: "1.0", appName: "Hello Flutter"); ``` ``` -------------------------------- ### Install and Pull Avo Codegen Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-codegen/programming-languages/ruby.mdx Install the Avo CLI and pull your generated Ruby code. Ensure you are logged into your Avo workspace. ```bash npm install -g avo avo login avo pull --branch my-branch-name ``` -------------------------------- ### Initialize Avo Inspector Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/go.mdx Initialize the AvoInspector with your API key, environment, app version, and app name. Obtain the API key from your Avo.app workspace settings. ```go func NewAvoInspector( apiKey string, env AvoInspectorEnv, appVersion string, appName string ) (*AvoInspector, error) ``` -------------------------------- ### Example Extracted Event Schema (Kotlin) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Example of the expected Map return format for extracted schema in Kotlin. ```kotlin val eventSchema = mutableMapOf().apply { put("userId", AvoInt()) put("'emailAddress'", AvoString()) put("'key'", AvoString()) } ``` -------------------------------- ### Initialize AvoInspector (Kotlin) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Constructor signature for initializing AvoInspector in Kotlin. Requires API key, application context, environment, and optionally an activity for the visual inspector and a public encryption key. ```kotlin class AvoInspector(apiKey: String, application: Application, env: AvoInspectorEnv, rootActivityForVisualInspector: Activity?, publicEncryptionKey: String?) ``` -------------------------------- ### Example Event Schema Return (Kotlin) Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/android.mdx Example of the expected Map return format for event schema in Kotlin. ```kotlin val eventSchema = mutableMapOf().apply { put("userId", AvoInt()) put("'emailAddress'", AvoString()) put("'key'", AvoString()) } ``` -------------------------------- ### Initialize AvoInspector in Objective-C Source: https://github.com/avohq/docs/blob/main/pages/reference/avo-inspector-sdks/ios.mdx Initialize the AvoInspector instance using Objective-C, providing the API key, environment, and optional parameters. ```objectivec -(instancetype) initWithApiKey: (NSString *) apiKey env: (AvoInspectorEnv) env proxyEndpoint: (NSString *) proxyEndpoint publicEncryptionKey: (NSString * _Nullable) publicEncryptionKey { ```