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

Use region specific prebid bundles #1661

Merged
merged 15 commits into from
Dec 17, 2024
Merged

Conversation

emma-imber
Copy link
Contributor

@emma-imber emma-imber commented Nov 18, 2024

What does this change?

Uses region specific bundles of Prebid to reduce the amount of javascript that we ship to the user.

Draft for testing

Why?

Before

Prebid chunk loaded in UK before:
Screenshot 2024-11-18 at 18 10 13

After

Prebid chunk loaded in UK after:
Screenshot 2024-11-18 at 18 11 15

Copy link

changeset-bot bot commented Nov 18, 2024

🦋 Changeset detected

Latest commit: bc6b9de

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 Minor

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 Nov 18, 2024

Ad load time test results

For consented, top-above-nav took on average 5030ms to load.
For consentless, top-above-nav took on average 3274ms to load.

Test conditions:

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

@emma-imber emma-imber added the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Nov 19, 2024
@emma-imber emma-imber force-pushed the ei/test-split-prebid-bundle branch from 0c6109c to 7928d43 Compare November 19, 2024 17:17
@emma-imber emma-imber marked this pull request as ready for review November 19, 2024 17:35
@emma-imber emma-imber requested a review from a team as a code owner November 19, 2024 17:35
@emma-imber emma-imber added [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR and removed [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR labels Nov 19, 2024
Copy link
Contributor

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

To install the beta version, run one of the following commands in your project directory:

npm install @guardian/commercial@0.0.0-beta-20241119173822
pnpm add @guardian/commercial@0.0.0-beta-20241119173822
yarn add @guardian/commercial@0.0.0-beta-20241119173822

@github-actions github-actions bot removed the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Nov 19, 2024
@emma-imber emma-imber marked this pull request as draft November 19, 2024 17:40
@emma-imber emma-imber added the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Nov 25, 2024
Copy link
Contributor

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

To install the beta version, run one of the following commands in your project directory:

npm install @guardian/commercial@0.0.0-beta-20241125125616
pnpm add @guardian/commercial@0.0.0-beta-20241125125616
yarn add @guardian/commercial@0.0.0-beta-20241125125616

@github-actions github-actions bot removed the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Nov 25, 2024
@emma-imber emma-imber added the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Dec 5, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

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

To install the beta version, run one of the following commands in your project directory:

npm install @guardian/commercial@0.0.0-beta-20241205151903
pnpm add @guardian/commercial@0.0.0-beta-20241205151903
yarn add @guardian/commercial@0.0.0-beta-20241205151903

@github-actions github-actions bot removed the [beta] @guardian/commercial Add this label to publish an @guardian/commercial beta npm release from a PR label Dec 5, 2024
dskamiotis
dskamiotis previously approved these changes Dec 9, 2024
@emma-imber emma-imber dismissed dskamiotis’s stale review December 9, 2024 10:49

Not ready for review yet - still a draft!

@dskamiotis
Copy link
Contributor

apologies for confusion, have tested locally just out of interest, with the pnpm run build:prod, and in my bundle-analyzer-report still getting the original size of 427kb, might I be missing a step?

@emma-imber
Copy link
Contributor Author

apologies for confusion, have tested locally just out of interest, with the pnpm run build:prod, and in my bundle-analyzer-report still getting the original size of 427kb, might I be missing a step?

Hey Demetrios - this PR is still a draft, and not ready for review yet.

In reply to your question about the prebid size - that's because the import is behind an AB test, so the build just contains the current version of prebid. If you were to run this locally, opt in to the test, use a VPN, and then check the version of prebid getting loaded in the network tab, you would see a smaller version being imported.

Copy link
Member

@arelra arelra left a comment

Choose a reason for hiding this comment

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

🎉

@emma-imber emma-imber marked this pull request as ready for review December 16, 2024 17:48
@emma-imber emma-imber merged commit f4219a3 into main Dec 17, 2024
13 checks passed
@emma-imber emma-imber deleted the ei/test-split-prebid-bundle branch December 17, 2024 13:12
@mchv
Copy link
Member

mchv commented Dec 20, 2024

@emma-imber 💎 Great job on this, looking forward for the outcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants