2

I want to create user journey's using AWS Pinpoint. My mobile app is made with Flutter and using Amplify package to create events)

pubspec.yaml

amplify_flutter: ^0.2.4
amplify_analytics_pinpoint: ^0.2.4

I am calling this method to add the event

Future<void> logLogin(String userId) async {
    await addEvent('_app.login', {PinPointAnalyticsKeys.userIdProperty: userId});
}

Future<void> addEvent(String eventName, Map<String, String> properties) async {
    AnalyticsEvent event = AnalyticsEvent(eventName);

    properties.forEach((key, value) {
        event.properties.addStringProperty(key, value);
    });

    Amplify.Analytics.recordEvent(event: event);
    await Amplify.Analytics.flushEvents();
}

Method handling the login:

Future<bool> performLogin(String username, String password) async {
    
    //Code that handle login using email/password => userId
    
    await _pinPoint.logLogin(userId);
}

My test journey: a user from a specific segment who does login should get an email right away.

enter image description here

I am having 2 issues:

  • Events get added to Pinpoint but after a delay (between 10 and 20min approximatively). Shouldn't it get added right away?
  • When event gets added (after the delay) no journey does get triggered, so no email sent, and the Pinpoint Journey Metrics doesn't change. What could be the reason?

  • Thank you all for your assistance, if I missed some details please let me know.

    Merouane T.
    • 746
    • 1
    • 10
    • 14

    0 Answers0