question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Amplify Personalize Record Events For MediaAutoTrack are Failing

See original GitHub issue

Describe the bug MediaAutoTrack Events Using Amplify SDK version - 3.3.3,3.3.2 is triggering events to tracker but they are failing due to bad payload . See the Sample Request/Response section at the bottom

https://docs.amplify.aws/lib/analytics/personalize/q/platform/js#working-with-the-api https://aws.amazon.com/blogs/aws/amazon-personalize-is-now-generally-available/

To Reproduce Steps to reproduce the behavior:

  1. Record Event for MediaAutoTrack Using the Dom ID for video player
  2. Play the Video
  3. Check Tracker Events are sent to Personalize
  4. Check Request/Response in Developer Tools
  5. HTTP 400 Error Code

Expected behavior Events are successfully submitted . HTTP 200 response code for Put Events

Desktop (please complete the following information):

  • OS: macOS Catalina
  • Browser: Firefox
  • Version: 68.8.0esr (64-bit)

Additional context

Sample Request

{
    "eventList": [
        {
            "eventId": "01cfc340-0539-184387240-0526-11eb-aa3a-29f4dbbd8521",
            "eventType": "TimeWatched",
            "properties": "{\"itemId\":\"593\",\"timestamp\":139.472841,\"duration\":597,\"eventValue\":0.2336}",
            "sentAt": 1601702130
        },
        {
            "eventId": "01cfc340-0539-184387240-0526-11eb-aa3a-29f4dbbd8521",
            "eventType": "TimeWatched",
            "properties": "{\"itemId\":\"593\",\"timestamp\":139.472841,\"duration\":597,\"eventValue\":0.2336}",
            "sentAt": 1601702130
        },
        {
            "eventId": "01cfc340-0539-184387240-0526-11eb-aa3a-29f4dbbd8521",
            "eventType": "TimeWatched",
            "properties": "{\"itemId\":\"593\",\"timestamp\":139.472841,\"duration\":597,\"eventValue\":0.2336}",
            "sentAt": 1601702130
        },
        {
            "eventId": "01cfc340-0539-184387240-0526-11eb-aa3a-29f4dbbd8521",
            "eventType": "TimeWatched",
            "properties": "{\"itemId\":\"593\",\"timestamp\":139.472841,\"duration\":597,\"eventValue\":0.2336}",
            "sentAt": 1601702130
        }
    ],
    "sessionId": "84387240-0526-11eb-aa3a-29f4dbbd8521",
    "trackingId": "1b2644e0-5b91-4fd5-a92c-fdc56ee02e1d",
    "userId": "12345678"
}

Sample Response

{"message":"timestamp is not allowed in properties. Please refer to documentation to include timestamp"}

Error x-amzn-ErrorType: InvalidInputException:http://internal.amazon.com/coral/com.amazonaws.services.personalize.events.exceptions/

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kcwinnercommented, Jan 12, 2021

Same issue on latest with @aws-amplify/analytics v4.0.5 Screen Shot 2021-01-12 at 1 13 44 PM Screen Shot 2021-01-12 at 1 14 35 PM

Editing the value to be TIMESTAMP in the provider solves this issue. This begs the question: does the provider just need changed to TIMESTAMP instead of timestamp?

0reactions
kylekirkbycommented, Jul 8, 2022

https://github.com/aws-amplify/amplify-js/blob/main/packages/analytics/src/Providers/AmazonPersonalizeHelper/MediaAutoTrack.ts#L187-L192

Here is the problematic block of code. The timestamp property is not allowed in properties. Could you please rename timestamp?

@josefaidt @mauerbac

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recording events - Amazon Personalize - AWS Documentation
Record events in real-time so Amazon Personalize can learn from your user's most recent activity and update recommendations as they use your application....
Read more >
Analytics - Personalized recommendations - JavaScript
Amazon Personalize can create recommendations by using event data, ... JavaScript - AWS Amplify Docs. ... For more information, see Record Events.
Read more >
amplify-js
Our default implementation works with Amazon Web Services (AWS), but AWS Amplify is designed to be open and pluggable for any custom backend...
Read more >
https://www.staplesadvantage.com ... - Phishcheck 2.0 beta - Details
Last Checked: Jul 22, 2019, 12:46 EDT. Check another URL. Analysis; Related Submissions 4; Whois Record; Resources 43; Redirects 0; View Source ...
Read more >
Setup Personalize - Web Analytics with Amplify
Datasets are organized within Amazon Personalize dataset groups. A dataset group can only have ... We are going to record Personalize events with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found