Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.
Gen1 DocsLegacy

Page updated Mar 26, 2026

ユーザーの識別

AWS will end support for Amazon Pinpoint on October 30, 2026,, and is no longer accepting any new users as of May 20 (see the linked doc). The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics.

このコールは、ユーザーについて指定した情報をAmazon Pinpointに送信します。これは認証されていないユーザーまたは認証されたユーザーのいずれかの場合があります。

さらに、identifyUserを呼び出すときにcustomPropertiesuserAttributesも提供できます。Amazon Pinpointコンソールは、そのデータをセグメント作成の条件の一部として使用可能にします。customPropertiesを使用して渡された属性はCustom Endpoint Attributesに表示され、userAttributesCustom User Attributesに表示されます。セグメント作成の詳細については、Amazon Pinpointドキュメントを参照してください。

以下に示すように、Amplify Authカテゴリから現在のユーザーのIDを取得できます。Authカテゴリドキュメントに従って、追加してセットアップしてください。

位置情報へのアクセスを要求して許可を受けた場合、UserProfile.Locationでもそれを提供できます。

UserProfile.Location location = UserProfile.Location.builder()
.latitude(47.606209)
.longitude(-122.332069)
.postalCode("98122")
.city("Seattle")
.region("WA")
.country("USA")
.build();
AnalyticsProperties customProperties = AnalyticsProperties.builder()
.add("property1", "Property value")
.build();
AnalyticsProperties userAttributes = AnalyticsProperties.builder()
.add("someUserAttribute", "User attribute value")
.build();
AWSPinpointUserProfile profile = AWSPinpointUserProfile.builder()
.name("test-user")
.email("user@test.com")
.plan("test-plan")
.location(location)
.customProperties(customProperties)
.userAttributes(userAttributes)
.build();
Amplify.Auth.getCurrentUser(authUser -> {
String userId = authUser.getUserId();
Amplify.Analytics.identifyUser(userId, profile);
}, exception -> {
Log.e("MyAmplifyApp", "Error getting current user", exception);
});
val location = UserProfile.Location.builder()
.latitude(47.606209)
.longitude(-122.332069)
.postalCode("98122")
.city("Seattle")
.region("WA")
.country("USA")
.build();
val customProperties = AnalyticsProperties.builder()
.add("property1", "Property value")
.build();
val userAttributes = AnalyticsProperties.builder()
.add("someUserAttribute", "User attribute value")
.build();
val profile = AWSPinpointUserProfile.builder()
.name("test-user")
.email("user@test.com")
.plan("test-plan")
.location(location)
.customProperties(customProperties)
.userAttributes(userAttributes)
.build();
Amplify.Auth.getCurrentUser({ authUser ->
Amplify.Analytics.identifyUser(authUser.userId, profile);
}, { exception ->
Log.e("MyAmplifyApp", "Error getting current user", exception)
})
UserProfile.Location location = UserProfile.Location.builder()
.latitude(47.606209)
.longitude(-122.332069)
.postalCode("98122")
.city("Seattle")
.region("WA")
.country("USA")
.build();
AnalyticsProperties customProperties = AnalyticsProperties.builder()
.add("property1", "Property value")
.build();
AnalyticsProperties userAttributes = AnalyticsProperties.builder()
.add("someUserAttribute", "User attribute value")
.build();
AWSPinpointUserProfile profile = AWSPinpointUserProfile.builder()
.name("test-user")
.email("user@test.com")
.plan("test-plan")
.location(location)
.customProperties(customProperties)
.userAttributes(userAttributes)
.build();
RxAmplify.Auth.getCurrentUser()
.subscribe(
result -> {
String userId = result.getUserId();
RxAmplify.Analytics.identifyUser(userId, profile);
},
error -> Log.e("AuthQuickStart", error.toString())
);

ユーザー情報を送信することで、ユーザーをそのユーザープロフィールとアプリ内のアクティビティまたはアクションに関連付けることができます。ユーザーのアクション属性は、同じuserIdを使用することで、デバイスとプラットフォーム全体で追跡することもできます。

ユーザーを識別し、関連するアプリアクティビティを識別するシナリオの例は以下の通りです:

  • ユーザーがアプリのサインアップを完了した場合
  • ユーザーがサインインプロセスを完了した場合
  • ユーザーがアプリを起動した場合
  • ユーザーがユーザープロフィールを変更または更新した場合