Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Port advertising and article-contents modules from "Beyond the Paywall". #134

Merged
merged 18 commits into from
Aug 4, 2022

Conversation

rhelmer
Copy link
Contributor

@rhelmer rhelmer commented Jul 30, 2022

Fixes #48.

This depends on:
mozilla-rally/web-science#301
mozilla-rally/web-science#302

Review expectations: just code review is OK, I've tested this in dev mode and that's easy to do if you'd like but not required.

@rhelmer rhelmer self-assigned this Jul 30, 2022
@rhelmer rhelmer marked this pull request as draft July 30, 2022 06:38
@rhelmer
Copy link
Contributor Author

rhelmer commented Jul 30, 2022

I've tested this on Firefox (which lives on a separate firefox-mv2-support branch for now) and Chrome (which is built from main), and seems to be working as expected.

The easiest way to test is to take a destinationDomains item from domains.ts and visit it in dev mode. You should see the following pings:

  • one study-enrollment at install time
  • userJourney every time a page visit ends (tab is closed or URL is navigated away from)
  • articleContents for any domain in destinationDomains that @mozilla/readability works on
  • advertisement for any domain in destinationDomains that the page-ads.content.ts script determines is an ad

The options page on the extension can be opened by clicking on the icon, or (since this behavior will change in #104) it can be reached like this in Chrome:

image

Or like this in Firefox (where it's called "Preferences" at least on macOS):

image

@rhelmer rhelmer requested a review from aaga August 1, 2022 20:30
@rhelmer rhelmer marked this pull request as ready for review August 2, 2022 20:37
Copy link
Contributor

@aaga aaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving so that you can merge today in case I'm offline. Nothing major

extensions/attention-stream/manifest.dev.json Show resolved Hide resolved
extensions/attention-stream/metrics.yaml Outdated Show resolved Hide resolved
extensions/attention-stream/package.json Outdated Show resolved Hide resolved
extensions/attention-stream/metrics.yaml Show resolved Hide resolved
extensions/attention-stream/metrics.yaml Outdated Show resolved Hide resolved
@rhelmer rhelmer merged commit 9fcbc65 into main Aug 4, 2022
@rhelmer rhelmer deleted the port-beyond-the-paywall-measurements branch August 4, 2022 23:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port "Beyond the Paywall" measurements to Chrome and Attention Stream
2 participants