---
schema_version: "1"
id: db7ed37aa85cbbcb7aa43315dfba18221480b446f507e19433955d482e23a599
title: AppAnalytics Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_IsvPartners_AppAnalytics.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_IsvPartners_AppAnalytics.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0efec763282dd0c816f83765298b2e845a19b20a3c20d950efda97f737525637
description: Contains methods to help with AppExchange App Analytics use cases, such as minimizing subscriber attrition and obtaining product insights.Logs the custom interaction using a label that you provide as an enum value and an interaction ID.Logs the custom interaction using a label that you provide as an enum value and an interaction ID that you provide as an Apex UUID.Logs the custom interaction using a label that you provide as an enum value.
---
# AppAnalytics Class

Contains methods to help with AppExchange App Analytics use cases, such as minimizing subscriber attrition and obtaining product insights.

## Namespace

[IsvPartners](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_IsvPartners.htm "The IsvPartners namespace provides a class associated with Salesforce ISV partner use cases, such as optimizing code, providing great customer trial experiences, and driving feature adoption.")

## Usage

Use AppAnalytics and its methods to log App Analytics custom interactions.

## Example

public void submitClicked() {
        Id jobId = System.enqueueJob(new MyQueueable(colorValue));
        IsvPartners.AppAnalytics.logCustomInteraction(
             MyPageInteractions.SUBMIT\_CLICKED, jobId);
}

- **[AppAnalytics Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_IsvPartners_AppAnalytics.htm#apex_IsvPartners_AppAnalytics_methods)**

## AppAnalytics Methods

These are methods for AppAnalytics.

- **[logCustomInteraction(interactionLabel, interactionId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_IsvPartners_AppAnalytics.htm#apex_IsvPartners_AppAnalytics_logCustomInteraction)**  
    Logs the custom interaction using a label that you provide as an enum value and an interaction ID.
- **[logCustomInteraction(interactionLabel, interactionUuid)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_IsvPartners_AppAnalytics.htm#apex_IsvPartners_AppAnalytics_logCustomInteraction_2)**  
    Logs the custom interaction using a label that you provide as an enum value and an interaction ID that you provide as an Apex UUID.
- **[logCustomInteraction(interactionLabel)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_IsvPartners_AppAnalytics.htm#apex_IsvPartners_AppAnalytics_logCustomInteraction_3)**  
    Logs the custom interaction using a label that you provide as an enum value.

### logCustomInteraction(interactionLabel, interactionId)

Logs the custom interaction using a label that you provide as an enum value and an interaction ID.

#### Signature

public static void logCustomInteraction(Object interactionLabel, Id interactionId)

#### Parameters

- **interactionLabel**:
    
    Type:
    
    Object A value used to label the custom interaction. The value of interactionLabel must be an enum with the same namespace as the code that calls the logCustomInteraction method.
- **interactionId**:
    
    Type: [Id](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_id.htm#apex_methods_system_id "Contains methods for the ID primitive data type.")
    
    An Apex ID that is associated with the custom interaction. The interactionId that you provide is hashed and tokenized before it’s included in AppExchange App Analytics package usage logs.

#### Return Value

Type: Void

### logCustomInteraction(interactionLabel, interactionUuid)

Logs the custom interaction using a label that you provide as an enum value and an interaction ID that you provide as an Apex UUID.

#### Signature

public static void logCustomInteraction(Object interactionLabel, System.UUID interactionUuid)

#### Parameters

- **interactionLabel**:
    
    Type:
    
    Object A value used to label the custom interaction. The value of interactionLabel must be an enum with the same namespace as the code that calls the logCustomInteraction method.
- **interactionUuid**:
    
    Type: System.UUID
    
    An Apex UUID that is associated with the custom interaction. The interactionId that you provide is hashed and tokenized before being included in AppExchange App Analytics package usage logs.

#### Return Value

Type: Void

### logCustomInteraction(interactionLabel)

Logs the custom interaction using a label that you provide as an enum value.

#### Signature

public static void logCustomInteraction(Object interactionLabel)

#### Parameters

- **interactionLabel**:
    
    Type:
    
    Object A value used to label the custom interaction. The value of interactionLabel must be an enum with the same namespace as the code that calls the logCustomInteraction method.

#### Return Value

Type: Void