Does Mobile Analytics still work?

0

I can see that tutorials and docs all suggest using Amplify for registering with Pinpoint, but I seem to have massive difficulty in getting it configured and working.

I've downloaded the mobile analytics sdk and am using the following code:

AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'eu-west-1:xxx',
Logins: {
'cognito-idp.eu-west-1.amazonaws.com/eu-west-1_xxx': result.getIdToken().getJwtToken()
}
});

app.mobileAnalyticsClient = new AMA.Manager({
appId : "xxx" // Pinpoint AppId
});
console.log("creating mobile analystics client");
var p = app.mobileAnalyticsClient.startSession();
console.log("started mobile analystics session");
var q = app.mobileAnalyticsClient.createEvent('LoginEvent');
console.log("recording login event");
var r = app.mobileAnalyticsClient.submitEvents();
console.log("submitting mobile analystics events");
console.log("responses: " + JSON.stringify(p));
console.log("responses: " + JSON.stringify(q));
console.log("responses: " + JSON.stringify(r));

i dont get any errors in the log, but im not getting anything in my pinpoint console.

creating mobile analystics client
started mobile analystics session
recording login event
submitting mobile analystics events
responses: {"eventType":"_session.start","timestamp":"2020-04-08T08:25:20.917Z","session":{"id":"213de044-d0d3-b844-83ca-e747b0ea3af0","startTimestamp":"2020-04-08T08:25:20.911Z"},"version":"v2.0","attributes":{},"metrics":{}}

responses: {"eventType":"LoginEvent","timestamp":"2020-04-08T08:25:20.920Z","session":{"id":"213de044-d0d3-b844-83ca-e747b0ea3af0","startTimestamp":"2020-04-08T08:25:20.911Z"},"version":"v2.0","attributes":{},"metrics":{}}

responses: []

posta 4 anni fa290 visualizzazioni
2 Risposte
0

Hi LordVillage,

The Amazon Mobile Analytics service is an older AWS service that is now deprecated. Customers have since migrated to Amazon Pinpoint which includes many of the capabilities of Amazon Mobile Analytics and much more (such as various messaging channels and messaging features).

If your interested in tracking Events using Amazon Pinpoint see https://aws-amplify.github.io/docs/js/analytics for how AWS Amplify can help you get started easily.

If your looking to leverage messaging features such as sending email in your application you could leverage the pinpoint SDK directly (i see your using JS - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Pinpoint.html)

Heres a sample app that combines the event tracking of Pinpoint to then trigger messages to your users - it may help you get started with some of the services capabilities.

https://github.com/aws-samples/amazon-pinpoint-event-trigger-demo/tree/alternate

Happy building,

Austin

AWS
con risposta 4 anni fa
0

Thanks Austin,

That's very helpful. I will look through the code to see if i cant migrate to Amplify. I'm already using Cognito, CognitoSync, APIGateway etc.

My main problem with Aplify right now is, I don't know React and or node and everything I can find has and import line:

import Amplify, { Analytics } from 'aws-amplify';

which fails with my project. I need to get into it, I know, but its a time issue currently.

All I really want to be able to do is record events to analyse how my app is being used.

Anyway, thanks for the links!

Scott

con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande