Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to compare sendBeacon and fetch numbers for users with no ad blocker #1416

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

emma-imber
Copy link
Contributor

What does this change?

Adds a test sendBeacon and fetch call to 10% of messenger background calls.

Why?

Jake and Ashish realised that sendBeacon is blocked by some ad blockers. In earlier testing, we discovered that sendBeacon is less reliable than fetch. It would be good to test if all of the flakiness of sendBeacon is explained by ad blockers. By adding a test to a part of the code that only executes if there’s no ad blocker, we can see if we then observe parity between fetch and sendBeacon.

This messenger code is only called by certain commercial templates, which will only be sending messages on the page if there is no ad blocker. This allows us to control for ad blockers, and hopefully to determine if ad blockers are the sole cause of sendBeacon's flakiness.

@emma-imber emma-imber requested a review from a team as a code owner June 11, 2024 15:21
Copy link

changeset-bot bot commented Jun 11, 2024

🦋 Changeset detected

Latest commit: 02c6fc9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/commercial Patch

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

Copy link
Contributor

github-actions bot commented Jun 11, 2024

Ad load time test results

For consented, top-above-nav took on average 5053ms to load.
For consentless, top-above-nav took on average 3089ms to load.

Test conditions:

  • 5mbps download speed
  • 1.5mbps upload speed
  • 150ms latency

@Jakeii
Copy link
Member

Jakeii commented Jun 13, 2024

🕵️

@emma-imber emma-imber force-pushed the ei/sendbeacon-reliability-testing branch from c373c9e to 02c6fc9 Compare June 17, 2024 10:15
@emma-imber emma-imber added the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Jun 17, 2024
Copy link
Contributor

🚀 0.0.0-beta-20240617102039 published to npm as a beta release

@emma-imber emma-imber merged commit 9e47081 into main Jun 17, 2024
13 checks passed
@emma-imber emma-imber deleted the ei/sendbeacon-reliability-testing branch June 17, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants