Closed Bug 1520258 Opened 2 years ago Closed 2 years ago

Spoc frequency cap via visibility


(Firefox :: New Tab Page, defect, P2)




Firefox 67
67.1 - Jan 28 - Feb 10
Tracking Status
firefox66 + verified
firefox67 --- verified


(Reporter: thecount, Assigned: thecount)



(Keywords: github-merged)


(2 files)

We need to show spocs only for a certain number of times. Probably from a server defined value.

We might also have multiple spocs or spocs showing below the fold.

This might be helpful: in seeing if an element is visible or not.

Severity: normal → enhancement
Assignee: nobody → sdowne
Iteration: --- → 66.4 - Jan 21 - 27
Priority: -- → P1
Iteration: 66.4 - Jan 21 - 27 → 67.1 - Jan 28 - Feb 10
Priority: P1 → P2
Duplicate of this bug: 1520892

[Tracking Requested - why for this release]: this will be uplifted into Pocket NT for 66 experiments

Blocks: 1525452
Closed: 2 years ago
Keywords: github-merged
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Duplicate of this bug: 1524295

Verified, what I did was to verify was:

  1. Set the pref browser.newtabpage.activity-stream.discoverystream.config to {"enabled":true,"show_spocs":true,"layout_endpoint":""}
  2. Make sure the pref browser.newtabpage.activity-stream.discoverystream.spoc.impressions is reset.
  3. Load a new tab.
  4. Scroll down new tab, and check the pref browser.newtabpage.activity-stream.discoverystream.spoc.impressions for changes.

expected: It should add timestamps to that pref inside an id, as you scroll down the new tab, new spocs should come into view, and when that happens, a new impression should be added to browser.newtabpage.activity-stream.discoverystream.spoc.impressions If you keep doing this, (or refreshing new tab with a spoc in view) eventually you'll stop seeing cards that say "sponsored by ..."


Comment on attachment 9043395 [details]
Bug 1520258 - Adding spoc frequency caps based on visibility

Beta/Release Uplift Approval Request

Feature/Bug causing the regression

Bug 1520258

User impact if declined

We will not be able to cap sponsored content ("SPOCs") to a maximum number of impressions during the Pocket experiment, thus making it very difficult to get valid/comparable data to existing implementations and our expectations of sponsored content performance. This is critical for Pocket's 2019 revenue goals.

Is this code covered by automated tests?


Has the fix been verified in Nightly?


Needs manual test from QE?


If yes, steps to reproduce

See The team is also working on a holistic test plan covering sponsored content and caching for end of day Feb 15th.

List of other uplifts needed


Risk to taking this patch


Why is the change risky/not risky? (and alternatives if risky)

There is a significant amount of functionality being added here, but it is considered critical enough for product to accept the risk.

The risk is mitigated by: isolating the implementation from production code; doing additional manual QA.

String changes made/needed


Attachment #9043395 - Flags: approval-mozilla-beta?

Comment on attachment 9043395 [details]
Bug 1520258 - Adding spoc frequency caps based on visibility

Planned uplift for Activity Stream, adds tests, verified in Nightly.
OK for uplift for beta 8.

Attachment #9043395 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Sounds like this should land first, then the work in bug 1524321.

I have verified that the issue is no longer reproducible on the latest Beta 66.0b8 (Build ID 20190214195736) and on the latest Nightly 67.0a1 (Build ID 20190215014208) on Windows 10 x64, Mac 10.14, and Arch Linux 4.14.3.

Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.