Skip to content

Conversation

@ericholscher
Copy link
Member

@ericholscher ericholscher commented Mar 7, 2025

This is much less intrusive than the stickybox,
and allows us to still have an ad injected,
but not cover the content for users when this happens.

Screenshot 2025-03-06 at 7 39 00 PM

Replaces #447
Closes #311

This is much less intrusive than the stickybox,
and allows us to still have an ad injected,
but not cover the content for users when this happens.
@ericholscher ericholscher requested review from a team and humitos as code owners March 7, 2025 00:34
@ericholscher ericholscher requested a review from agjohnson March 7, 2025 00:34
Copy link
Contributor

@davidfischer davidfischer left a comment

Choose a reason for hiding this comment

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

Looks good. My only worry is in the rare case where none of the selectors match and we just append the ad to <body> but that probably won't happen.

[FALLBACK_DOCTOOL]: ["article", "main", "div.body", "div.document", "body"],

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

The code looks good. I haven't tested it locally, tho.

I would prefer to keep using the same ID as we are using for all the other ads, for consistency, tho.

@humitos
Copy link
Member

humitos commented Mar 17, 2025

This looks great! I tested it locally and I found only two doctools where it doesn't work great, but they seem to be special cases and we can adapt/fix them later in another PR. I think we can merge it and deploy it tomorrow.

Pelican

Screenshot_2025-03-17_13-19-01

Sphinx Awesome theme

Screenshot_2025-03-17_13-18-51

@ericholscher
Copy link
Member Author

Yea, I think we can adjust it a bit as we see how it works, and also of course just not add the ad if we fallback to body if it's an issue in practice.

@ericholscher ericholscher merged commit 3a6e6a6 into main Mar 17, 2025
4 checks passed
@ericholscher ericholscher deleted the footer-ads-default branch March 17, 2025 21:46
@ericholscher ericholscher self-assigned this Mar 17, 2025
ericholscher pushed a commit that referenced this pull request Jun 24, 2025
Alternates between using the stickybox placement and the footer
placement on unknown themes. It also adds an ID to the stickybox
placement so we can see performance of it.

As written, this introduces a random element which may not be desirable.
We could instead introduce the stickybox only on very wide screens (say
>=1600px) or we could base it on the title of the project or something
like that to make it deterministic. I'm open to suggestions.


>         // TODO: Check this placement on the dashboard,
>         // and see how this is performing.

The footer placement is performing very well at ~4x the CTR with ~50%
the view rate vs. previously.

Ref: #562
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.

EthicalAd: implement better positioning

4 participants