@baileyherbert - couldn’t agree more, that’s not something that I wanted to do either, but was forced-to. It’s basically a matter of months until all 3rd party cookies will be blocked, by default. Chrome said they’re doing this in phases, but other browsers already implemented it.
I believe that a JS snippet that would generate a top bar would be extremely difficult to implement, given the variety of approaches in designing a website (absolute positionings, fixed, sticky, etc).
Perhaps a better approach would be to show a message bubble (floating box) that would appear after X time, with one or two buttons (Buy now, View product) would be a better. It could even support some options, so when you’re adding the JS snippet, perhaps we could chose its positioning (top, bottom, left, right), and its color (light or dark), whether it drops a shadow or not, etc.
Here’s two quick mock-ups for both light & dark mode (look @ the bottom right corner), it doesn’t even need to be as intrusive as the current iframe: