Dynamic metadata concept & logic

Doug,

I am thinking about “dynamic metadata” more generally, and there is still an area that is a little unresolved. When you have the same browser tab = the same session id and metadata is changing, like in our case, if viewing the same video in the same tab with different tokens.

When I do it, some properties are updated (as “endedAt”), and the reason is clear, but metadata itself is not updated/added, but it has been keeping in the same state since the first viewing.

Is it mean that the rest of the dynamic metadata is lost and not recorded anywhere? Here, “token” is used as an example of dynamic metadata that has been changed inside the same session id tab, but generally, there are other cases when something like this could happen, especially in SPA applications.


And what is the purpose of the “metadata” property on the top level of analytics data?

Milos

Milos,

Is it mean that the rest of the dynamic metadata is lost and not recorded anywhere

If you have a session started in the tab - with dynamic metadata, and then attempt a second session in the same tab with new dynamic metadata - the 2nd is not recorded.

I just tested with resume.a.video. First “Bilbo” watched the video. Then “Frodo”. If I stay in the same tab - all the data is saved for Bilbo.

Doug

Yep, I supposed that. Btw, what do you think that those new dynamic metadata would be added to the metadata array? Some keys would be used multiple times and when adding a new item, the previous ones should be check, if there is already the same key with the same value or not. I understand that some changes would be necessary to process correct searching if a query would use such metadata.

And can you answer also the question: And what is the purpose of the “metadata” property on the top level of analytics data?

Milos

Milos - it did not appear that Frodo was added in addition to user Bilbo. but perhaps you are asking about:

First visit
Metadata[username]=bilbo
2nd visit:
metadata[username]=frodo&metadata[relationtoBilbo]=nephew

and if relationToBilbo will be added. I dont think it will.

Looking at your code- I think the metadata are the params you are sending in the SDK. When I use CURL to the api I do not get metadata, period, title or videoId… so I think it is added by the SDK

Doug

Doug,

I supposed that. It was only a bit deeper thinking, if possible, how, and if it has a valuable sense to think about extended functionality around metadata logging above the actual functionality.

Thanks for your answer. I’ll look at it how “metadata” is manipulated through SDK.