Closed Bug 1566707 Opened 6 years ago Closed 5 years ago

Story engagement label Backend

Categories

(Firefox :: New Tab Page, task, P1)

67 Branch
task
Points:
1

Tracking

()

RESOLVED FIXED
Iteration:
71.1 - Sept 2 - 15

People

(Reporter: wolasi, Assigned: jkoren)

References

Details

Attachments

(1 file)

Background
We want to label stories that have crossed an engagement threshold based on their click through rate.

  • Stories that have been recently and have no engagement data should be labelled as Fresh
  • Stories that achieve a certain level of engagement should be labelled as Popular

Let's determine what a good click rate threshold should be for the Popular label.

Goal
To see how these labels affect story engagement

Design Spec
https://www.figma.com/file/eGdZVYlZ5evvePHUCtKnYg7u/New-Tab-Spec-for-Fx-70?node-id=307%3A1

Flags: needinfo?(wkonu)
Blocks: 1565709
Assignee: nobody → mathijs
Iteration: --- → 70.2 - Jul 22 - Aug 4
Points: --- → 1
Priority: -- → P1
Flags: needinfo?(wkonu)
Summary: Story view count Backend → Story engagement label Backend

ETA to start on this Aug 12 (~1 day) - due Aug 13

Iteration: 70.2 - Jul 22 - Aug 4 → 70.3 - Aug 5 - 18

As described in front-end patch to display engagement, client expect a property engagement on an item. Its value should be of type String carrying exact text to be displayed in the card e.g "Fresh" or "Popular"

with recommendations JSON as
"recommendations": [
{
"id": 43816,
"url": "http://getpocket.com/...",
"domain": "theatlantic.com",
"engagement" : "Fresh",
"title": "Test",
....
},

https://github.com/mozilla/activity-stream/pull/5237#issue-305692887

See Also: → 1573905

Did we settle on a metric/threshold for displaying "Fresh" or "Popular".

I remember you saying you'd like the top 20-25% most-clicked items to be Popular and the rest Fresh?

I'll build out something and show it to you on Monday so you can QA.

Flags: needinfo?(wkonu)

Popular: items in the top 20% for CTR

Let's skip the Fresh label for now.

Flags: needinfo?(wkonu)
Iteration: 70.3 - Aug 5 - 18 → 70.4 - Aug 19 - Sep 1

From Mathijs on slack:
@jkoren is familiar with this codebase and could make this change if it's important enough to make it onto his plate. If not, my understanding is that the client-side changes are done and we can make the server-side change off-train when I'm back.

Jonathan, can you knock this out for us this month? Or do we need to wait until Oct when Mathijs is back?

Flags: needinfo?(jkoren)
Iteration: 70.4 - Aug 19 - Sep 1 → 71.1 - Sept 2 - 15

Yeah thats fine

Flags: needinfo?(jkoren)

Thanks, Jonathan!

Assignee: mathijs → jkoren

Backend changes are on bug1566707.web.readitlater.com , and they'll hopefully go to prod Monday, Sept 16.

There's engagement field on each item. Its value is either empty string or popular. The returned items in the top 20% of CTR get the label.

Example popular record:

   {
      "id": 45532,
      "url": "https://getpocket.com/explore/item/meet-ladybeard-the-crown-prince-of-japan-s-strangest-music-scene?utm_source=pocket-newtab",
      "domain": "narratively.com",
      "title": "Meet Ladybeard, the Crown Prince of Japan’s Strangest Music Scene",
      "excerpt": "Richard Magarey has facial hair, pigtails, a closetful of schoolgirl outfits and an endless supply of energy. In Tokyo, he became the world’s u
nlikeliest death metal superstar.",
      "image_src": "https://img-getpocket.cdn.mozilla.net/direct?url=https%3A%2F%2Fpocket-image-cache.com%2F2000x%2Fhttps%253A%252F%252Fnarratively.com%252Fwp-co
ntent%252Fuploads%252F2018%252F10%252Fladybeard_HEADER_2580-522x310.jpg&resize=w450",
      "published_timestamp": "-62169984000",
      "engagement": "popular",

Example unpopular record:

    {
      "id": 45508,
      "url": "https://www.nytimes.com/interactive/2019/09/10/magazine/college-inequality.html?utm_source=pocket-newtab",
      "domain": "nytimes.com",
      "title": "I Was a Low-Income College Student. Classes Weren’t the Hard Part.",
      "excerpt": "Schools must learn that when you come from poverty, you need more than financial aid to succeed.",
      "image_src": "https://img-getpocket.cdn.mozilla.net/direct?url=https%3A%2F%2Fstatic01.nyt.com%2Fimages%2F2019%2F09%2F15%2Fmagazine%2F15mag-inequality%2F15m
ag-inequality-facebookJumbo.jpg&resize=w450",
      "published_timestamp": "1568088005",
      "engagement": "",

@jdavis Someone else will need to make the change in firefox to draw the actual label.

Flags: needinfo?(jdavis)

UI for displaying these labels landed in nightly with PR https://github.com/mozilla/activity-stream/pull/5237. Fix displays engagement string value as is in UI.

Noticed in #comment 9 value of engagement field as all lower case 'popular'. If its easier we should send it from back-end with correct case e.g. 'Popular'. Thanks!

Screenshot confirming deployment and labels

Deployed. Labels show up in nightly. Screenshot attached.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Thanks @jkoren!

@marius/@ciprian, can y'all verify that this is showing up as it should in Beta 70? Design spec in #c0

Flags: needinfo?(mcoman)
Flags: needinfo?(jdavis)
Flags: needinfo?(cmuresan)

Aaand per this slack thread [1] this isn't 100% ready to ship and we're late in the Beta 70 cycle.

@jkoren - can you back out this change?

We'll reassess with Mathijs is back vs. trying to tweak this to make it for 70.

[1] https://mozilla.slack.com/archives/CEZEF1AHX/p1568737325005800

Please let me know if you have any questions. Thanks!

Flags: needinfo?(mcoman)
Flags: needinfo?(jkoren)
Flags: needinfo?(cmuresan)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(jkoren)
jkoren-44283:~ jkoren$    curl -s 'https://getpocket.com/v3/firefox/global-recs/?useCache=false' -H 'authorization: Basic YWRtaW46bHV2NHBvY2tldA==' -H 'Origin: null' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' -H 'content-type: application/json' -H 'Accept: */*' -H 'x-accept: application/json' -H 'Connection: keep-alive' --data-binary '{"guid":"40VTeA87gx60lr9b81d2a69B36p1g0ltsq4m18jR05K498TK742dtVbdwaKbDeP9","version":3,"locale_lang":"en-US","count":3,"access_token":null,"consumer_key":"70018-b83d4728573df682a7c50b3d", "feed_variant":"default_spocs_on", "count":27 }' |jq .|grep engagement

Is now returning nothing popular.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: