Unable to get the custom event details in-depth through connect api

Hi All,

While consuming data stream through connect API I was unable to get custom event details like event_id, event_name, event_value

Steps to reproduce issue:

1. Create custom event inside mobile app through urban airship android SDK
2. Then we look into connect API console the custom event data point
3. I able get just event body details through connect API
4. I was unable to get the internal details of event body like id, name, value, interactionId and etc..

Please provide how to get the custom event details through connect API

Didn't find what you were looking for?

New post

Comments

9 comments

  • Hi Chnakaya,

    Would you mind posting the details of how you implemented Custom Events in your app in addition to the full response you received from the Connect stream?

    Comment actions Permalink
    0
  • Hi Michael Halka,

    I follows like below

    Inside my android app:

    public void onClick(View view) {

    System.out.println("btnEvent is called ");

    // Create and name an event
    CustomEvent event = new CustomEvent.Builder("consumed_content").setEventValue(123.12).create();

    // Then record it
    UAirship.shared().getAnalytics().addEvent(event);

    }

    In Connect Stream response:

    eventBody=CustomEvent{name='consumed_content', value=Optional.absent(), interactionId=Optional.absent(), interactionType='null', lastDelivered=Optional.of(com.urbanairship.connect.client.model.responses.AssociatedPush@b436531), triggeringPush=Optional.absent(), sessionId=Optional.absent()}

    From above response stream I was unable get the Event Name i.e,"consumed_content" through Java Connect API

    Comment actions Permalink
    0
  • Chnakaya,

    I'm seeing the name of the event here:

    eventBody=CustomEvent{name='consumed_content',...


    As described in the Custom Event response object, some of the values may be absent. Since it appears these events are not occurring from a push event, it makes sense that the rest of the attributes are absent from your response.

    For testing, you may instead try adding a custom event when a push notification is tapped on from the Notification Tray. You would do this inside the callback for when the notification is interacted with. You should see more info come across for the Custom Event.

    Comment actions Permalink
    0
  • Hi Michael Halka,

    From Custom event response I am able to get the below details only through Connect Client Library
    event.getEventBody();
    event.getEventBody().getType();

    I was unable to get the below details of custom event through Connect Client Library
    name, value, interactionId, interactionType and etc..

    Comment actions Permalink
    0
  • Chnakaya,

    Just to clarify, you mean to say that when you make the following calls in your Connect Client:

    parsedCustomEvent.getName()

    parsedCustomEvent.getValue().get()

    parsedCustomEvent.getInteractionId()

    That it is not returning anything, is that correct?

    Comment actions Permalink
    0
  • Hi Michael Halka,

    I able to get the custom event information through connect API.

    Below Is the response custom event information:

    {identifier='59c39bb1-32e5-11e6-badf-90e2ba025ad8', eventType=CUSTOM, occurred=2016-06-15T10:37:39.491Z, processed=2016-06-15T10:38:53.165Z, offset='8132', deviceInfo=Optional.of(DeviceInfo{channelId='b799a1c1-7b5b-4fab-bce3-ff01ff4ac65f', platform=ANDROID, namedUsedId=Optional.absent(), attributes={}, identifiers={locale_variant=, app_version=1.0, device_model=XT1033, connection_type=WIFI, app_package_name=com.example.srinivas.vidyayugtest, iana_timezone=Asia/Kolkata, push_opt_in=true, locale_country_code=AU, device_os=5.1, locale_timezone=19800, carrier=!dea, locale_language_code=en, location_enabled=false, background_push_enabled=true, ua_sdk_version=7.0.4, location_permission=NOT_ALLOWED}}), eventBody=CustomEvent{name='consumed_content', value=Optional.of(123.12), interactionId=Optional.absent(), interactionType='null', lastDelivered=Optional.of(com.urbanairship.connect.client.model.responses.AssociatedPush@edd275a1), triggeringPush=Optional.absent(), sessionId=Optional.absent()}}

     

    From above response I was unable to get the custom event body information through connect api.

    Comment actions Permalink
    0
  • Hi Chnakaya,

    I'm not sure I understand your response. In the response you posted, you bolded the section that details the Custom Event Body, however you are claiming you are unable to get the custom event body. 

    The Custom Event Body is shown in the response you posted.

    Comment actions Permalink
    0
  • HI Michael Halka,

    I able get the above total response through below statement of custom event
    Statement: event.toString()

    I able get the custom EventBody response details through below statement

    Statement: event.getEventBody().toString()
    Response:
    CustomEvent{name='consumed_content', value=Optional.of(123.12), interactionId=Optional.absent(), interactionType='null', lastDelivered=Optional.of(com.urbanairship.connect.client.model.responses.AssociatedPush@edd275a1), triggeringPush=Optional.absent(), sessionId=Optional.absent()}

    I was unable to get the name, value, interactionId, interactionType details of EventBody response?
    What is the api to get the internal details of Custom EventBody?

    Comment actions Permalink
    0
  • Hi Chnakaya,

     Okay, so you're not looking for an API to get that information. You're looking for a specific Java Method to get that information.

    Now, the Connect Java Library is open-source, so you can access the code.

    Specifically, you can take a look at the Custom Event Response here

    In there, you can see the Java Methods you can use to access the various properties of the Custom Event response that is returned to you.

    Comment actions Permalink
    0

Please sign in to leave a comment.