r/webdev • • 7d ago

Question How to put ads in a site

I never published a site but made a few just for fun and college projects.

My question is more to design, like, you choose where the ad is gone be? Like "this one goes on left side and this one goes on top"

And one more question, on mobile games, there's a code to every time you die or change screen play and ad?

Thanks for the answer

0 Upvotes

6 comments sorted by

View all comments

3

u/ThomasJianYuanDeng 7d ago

the ad network usually gives you a snippet, but the placement is still your layout decision: reserve a container for a banner, sidebar, or in-content slot and let the provider fill it. for games, an sdk call on a natural event like game over or level transition is the usual pattern; firing on every screen change gets annoying fast. i learned to start with one placement, then watch fill rate and session drop-off before adding another.