Search code examples
cordovaamazon-web-servicesamazon-mobile-analytics

Amazon Mobile Analytics data not showing up in web console


I'm using the AWS Mobile Analytics JavaScript SDK through a Cordova/PhoneGap app. My whitelist is set to allow all traffic. While looking through my network trace I can see the events being sent properly over HTTP:

HTTP 202 _session.start
HTTP 202 custom events
...
HTTP 202 _session.stop

Heres an exmple of the x-amz-Client-Context header that im sending:

{
"client": {
    "client_id":"xxx",
    "app_title":"HelloWorld",
    "app_version_name":"0.0.1",
    "app_version_code":"0.0.1",
    "app_package_name":"com.company.hello"
},
"env":{
    "platform":"unknown",
    "platform_version":"46.0.2490.76",
    "model":"Chrome",
    "make":"unknown",
    "locale":"en-US"
},
"services":{
    "mobile_analytics":{
        "app_id":"xxx",
        "sdk_name":"aws-sdk-mobile-analytics-js",
        "sdk_version":"0.9.1:2.3.3"
    }
},
"custom":{}

}

My question is why isn't the data showing up in the management console? I understand that it could take up to 60 min., but I've been testing over a couple days and haven't seen any results show up in graphs.


Solution

  • If you are receiving 202 responses from the Mobile Analytics end-point that indicates that the requests to aggregate your data were received by the Mobile Analytics service and that the format of the requests passes the general validation (as indicated here: http://docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html).

    However, there is a possibility that the platform you are sending may not be one of the supported platforms for aggregation in the Console. From the docs link above:

    Valid values: iphoneos, android, windowsphone, blackberry, macos, windows, linux

    If you submit events for a platform that is not included in the list above those events will still be accepted and you can get them exported to S3 or RedShift but those events won't be aggregated on in the Console.

    Can you please update the question with an example of an event you are sending (please redact any sensitive information before posting the event in the question).