I don't know what to specify for trackingId and eventType in PutEvents.

0

I am currently looking to implement an in-game item recommendation using Amazon Personalize. I have set the Domain to "custom" and only set the data for ItemInteractions and have trained them to create campaigns. We have now reached the point where we can recommend items to new users and display the most popular initial items.

However, I am having trouble recommending the next item to a new user who has purchased several items. I looked into how to implement this new item purchase status in Personalize, and found that using the PutEventsAPI is a good way to do so. However, there are some required parameters of this PutEventsAPI that I don't understand.

As a prerequisite, I am studying the API by looking at the following URL

https://docs.aws.amazon.com/ja_jp/personalize/latest/dg/API_UBS_PutEvents.html

  • trackingId

In this field, you write the ID of the Event, right? I believe this is the same as "Event trackers" in the console. However, as I mentioned above, I have not registered any Events for the sake of simplicity. What should I specify here?

  • eventType of eventList

I believe this is where you specify the event specified in the EVENT_TYPE field of the ItemInteractions dataset schema. However, in my ItemInteractions, EVENT_TYPE does not exist. In this case, what should I specify here?

MyItemInteractionsData

USER_ID,ITEM_ID,TIMESTAMP
1,14,1704124800
1,23,1704124800
1,26,1704124800
1,27,1704124800
1,2,1704128400
1,21,1704128400
1,13,1704128400
1,25,1704128400
1,1,1704132000
...
2,8,1704240000
2,9,1704240000
...
hoge
asked a month ago66 views
1 Answer
2
Accepted Answer

Hi,

If you want to track an event you need to create an eventTracker. You define it by calling the event tracker API: https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html

After you create it, you can send events to this event tracker using the trackingId.

https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_PutEvents.html

eventType is the type of the interaction. For a video on demand use case, that may be a "click" or a "watch" for a retail use case, it may be a "purchase event". Event types serve two purposes:

  1. Allow the model to learn which event types are more meaningful based on which predict future interactions more.
  2. Allow you to filter to only train the model with certain event types as you experiment.

If you are using domain recommender, the eventTypes are predefined, if you are creating a custom recommendation solution, it can be any string that identifies your event. Make sure the string is always exactly the same for all events of the same type.

You should add event_type to your interactions dataset if you want to use it.

This is an example of using eventTracker and no eventType: https://github.com/aws-samples/amazon-personalize-samples/tree/master/getting_started/notebooks This is an example of using eventTracker with eventType: https://github.com/aws-samples/amazon-personalize-immersion-day/tree/main/Media

AWS
Anna_G
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Anna_G, thank you for your response. I was mistaken about the event tracker. I will make this one and push it.

    Also, I am using custom as the event type, so I will use the same string to unify them.

    Thank you for the tutorial. I will take a look at this one as well.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions