Adds video attention time tracking function to videos service#254
Conversation
🦋 Changeset detectedLatest commit: 14b8960 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| /* | ||
| * This method is used to submit component attention time tracking updates for videos from the web layer. | ||
| * */ | ||
| void sendVideoAttentionTime(1:map<string, i64> componentAttentionMs), |
There was a problem hiding this comment.
Is this typed as a map so that we can send attention times for multiple videos?
There was a problem hiding this comment.
Good question, it's set up to match what Ophan is expecting. We could alternatively take just a single component id and ms value as arguments.
There was a problem hiding this comment.
Ah i see, i think its fine to leave it as it is.
There was a problem hiding this comment.
Pull request overview
Adds a new Thrift API method on the Videos service to allow the web layer (via Bridget) to send DCAR video attention-time updates to Ophan, aligning with existing video media event tracking patterns.
Changes:
- Added
sendVideoAttentionTime(1:map<string, i64> ...)to theVideosservice inthrift/native.thrift. - Added/updated inline service documentation comments for the video tracking methods in the IDL.
- Added a Changesets entry to publish a minor version bump for
@guardian/bridget.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| thrift/native.thrift | Extends the Videos Thrift service with a new attention-time tracking method and associated documentation. |
| .changeset/lovely-words-rule.md | Declares a minor release for @guardian/bridget to ship the new API surface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ebd559b to
c12e0fd
Compare
What does this change?
As discussed with @abeddow91, @owenmp and @EnochHankombo92. This changes adds a new function the videos service which will allow DCAR video attention time updates to be sent via Bridget to Ophan. This is consistent with the approach take to submit video media events to Ophan via Bridget.
Related: https://github.com/guardian/dotcom-rendering/blob/ef940ab2214794820992a3a181ce3c2d27340ef4/dotcom-rendering/src/lib/useVideoAttentionTracking.ts#L99-L103
How has this change been tested?
Not tested, open to suggestions?