Skip to content
v2.273.0

AnalyticsConfiguration Struct ​

The settings for Amazon Pinpoint analytics configuration.

With an analytics configuration, your application can collect user-activity metrics for user notifications with an Amazon Pinpoint campaign. Amazon Pinpoint isn't available in all AWS Regions. For a list of available Regions, see Amazon Cognito and Amazon Pinpoint Region availability: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html#cognito-user-pools-find-region-mappings.

Example ​

ts
import * as pinpoint from 'aws-cdk-lib/aws-pinpoint';

declare const userPool: cognito.UserPool;
declare const pinpointApp: pinpoint.CfnApp;
declare const pinpointRole: iam.Role;

new cognito.UserPoolClient(this, 'Client', {
  userPool,
  analytics: {
    // Your Pinpoint project
    application: pinpointApp,

    // Whether to include user data in analytics events
    shareUserData: true,
  },
});

Properties ​

applicationCfnAppapplicationCfnAppapplicationCfnAppApplicationCfnAppApplicationCfnApp= no configuration, you need to sp…#
The Amazon Pinpoint project that you want to connect to your user pool app client.
notes · default

Amazon Cognito publishes events to the Amazon Pinpoint project. You can also configure your application to pass an endpoint ID in the AnalyticsMetadata parameter of sign-in operations. The endpoint ID is information about the destination for push notifications.

Default: no configuration, you need to specify either application or all of applicationId, externalId, and role.

applicationIdstringapplication_idstrapplicationIdStringApplicationIdstringApplicationId*string= no configuration, you need to sp…#
Your Amazon Pinpoint project ID.
default

Default: no configuration, you need to specify either this property along with externalId and role or application.

externalIdstringexternal_idstrexternalIdStringExternalIdstringExternalId*string= no configuration, you need to sp…#
The external ID of the role that Amazon Cognito assumes to send analytics data to Amazon Pinpoint.
default

Default: no configuration, you need to specify either this property along with applicationId and role or application.

roleIRoleRefroleIRoleRefroleIRoleRefRoleIRoleRefRoleIRoleRef= no configuration, you need to sp…#
The IAM role that has the permissions required for Amazon Cognito to publish events to Amazon Pinpoint analytics.
default

Default: no configuration, you need to specify either this property along with applicationId and externalId or application.

shareUserDatabooleanshare_user_databoolshareUserDataBooleanShareUserDataboolShareUserData*bool= false#
If `true`, Amazon Cognito includes user data in the events that it publishes to Amazon Pinpoint analytics.