You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where bidRequested is the event name. However, this throws the warning "WARNING: Generic analytics: options.events.bidRequested does not match any known Prebid event".
Looking at line 51 of genericAnalyticsAdapter.js its looking to validate events against the constants declared using CONSTANTS.EVENTS.hasOwnProperty(event)
This would only pass the conditional check if we entered the constant name and not the event name (BID_REQUESTED vs bidRequested).
Unsure if this is a code bug or a documentation bug (or if I'm doing something wrong here).
Steps to reproduce
Add the generic analytics module config as per the docs
Enable debugging messages
Look in the console for the warning mentioned above
Type of issue
Bug
Description
As per the docs, for the generic analytics adapter, event names are used as the property name in the events object like so:
Where
bidRequested
is the event name. However, this throws the warning "WARNING: Generic analytics: options.events.bidRequested does not match any known Prebid event".Looking at line 51 of genericAnalyticsAdapter.js its looking to validate events against the constants declared using
CONSTANTS.EVENTS.hasOwnProperty(event)
This would only pass the conditional check if we entered the constant name and not the event name (
BID_REQUESTED
vsbidRequested
).Unsure if this is a code bug or a documentation bug (or if I'm doing something wrong here).
Steps to reproduce
Test page
https://jsfiddle.net/2v8p47wm/1/
Expected results
To get no error, and for event names to be used as event properties.
Actual results
Console warning of invalid event
Platform details
Chrome 118.0, MacOS 14.0, PreBid.js 8.23.0
The text was updated successfully, but these errors were encountered: