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

Subscribing for prebid events #12269

Closed
Andrey9300 opened this issue Sep 25, 2024 · 5 comments
Closed

Subscribing for prebid events #12269

Andrey9300 opened this issue Sep 25, 2024 · 5 comments

Comments

@Andrey9300
Copy link

Type of issue

Question

Description

In prebid 9+ I can't subscribe for analytics, because adapter and adapterManager become private.
As I understand, the right way to have analytics is to publish an analytics module to prebid.
Actually, I don't understand why I can't subscribe to events to support my own monitoring in my project.
I'm be glad if you recommend me how to solve subscription for prebid events.

Platform details

Prebid.js 9+

@dgirardi
Copy link
Collaborator

Events are available through onEvent: https://docs.prebid.org/dev-docs/publisher-api-reference/onEvent.html
There's also a generic analytics module: https://docs.prebid.org/dev-docs/modules/genericAnalyticsAdapter.html

@patmmccann
Copy link
Collaborator

patmmccann commented Sep 25, 2024

are you a publisher or a module maintainer? if the former, were you an npm consumer?

@Andrey9300
Copy link
Author

Yep, I forgot to say that I'm a publisher and build prebid via npm with some modules.

I think onEvent might fit to me.

The next small thing that it is now I can't get constant with names of all events from prebid.js/src/constants.json. But it is fine, but quite strange)

@dgirardi
Copy link
Collaborator

I can't get constant with names of all events

the reason for this and disabling most other imports in general is that they are not part of the public API, so they're subject to change without notice - which would break anyone depending on them. For the public API we take care to limit breaking changes to major version releases, but it's not feasible to do that for the entire codebase.

@Andrey9300
Copy link
Author

Yes, you are right.

Thank you for help!

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

No branches or pull requests

3 participants