Amplify Personalize Record Events For MediaAutoTrack are Failing
See original GitHub issueDescribe 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:
- Record Event for MediaAutoTrack Using the Dom ID for video player
- Play the Video
- Check Tracker Events are sent to Personalize
- Check Request/Response in Developer Tools
- 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:
- Created 3 years ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue on latest with
@aws-amplify/analytics
v4.0.5Editing the value to be
TIMESTAMP
in the provider solves this issue. This begs the question: does the provider just need changed toTIMESTAMP
instead oftimestamp
?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 inproperties
. Could you please renametimestamp
?@josefaidt @mauerbac