This document describes how to add a new Analytics module to Prebid Server.
Analytics modules are enabled through the Configuration. You’ll need to define any properties in config/config.go which are required for your module.
Your new module belongs in the analytics/{moduleName}
package. It should implement the PBSAnalyticsModule
interface from
analytics/core.go
The NewPBSAnalytics
function inside analytics/config/config.go instantiates Analytics modules
using the app config. You’ll need to update this to recognize your new module.
The filesystem module is provided as an example. This module will log dummy messages to a file.
It can be configured with:
analytics:
file:
filename: "path/to/file.log
Prebid Server will then write sample log messages to the file you provided.