pubstack

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

README

Pubstack Analytics

In order to use the pubstack analytics module, it needs to be configured by the host.

You can configure the server using the following environment variables:

export PBS_ANALYTICS_PUBSTACK_ENABLED="true"
export PBS_ANALYTICS_PUBSTACK_ENDPOINT="https://openrtb.preview.pubstack.io/v1/openrtb2"
export PBS_ANALYTICS_PUBSTACK_SCOPEID=<your scopeId here> # should be an UUIDv4

Or using the pbs configuration file and by appending the following block:

analytics:
    pubstack:
      # Required properties
      enabled: true
      endpoint: "https://openrtb.preview.pubstack.io/v1/openrtb2"
      scopeid: "<scopeId>" # The scopeId provided by the Pubstack Support Team
      # Optional properties (advanced configuration)
      configuration_refresh_delay: "2h" # Dynamic configuration delay
      buffers: # Flush events to Pubstack when (first condition reached)
        size: "2MB" # greater than 2MB
        count : 100 # greater than 100 events
        timeout: "15m" # greater than 15 minutes

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModule

func NewModule(client *http.Client, scope, endpoint, configRefreshDelay string, maxEventCount int, maxByteSize, maxTime string, clock clock.Clock) (analytics.Module, error)

func NewModuleWithConfigTask

func NewModuleWithConfigTask(client *http.Client, scope, endpoint string, maxEventCount int, maxByteSize, maxTime string, configTask ConfigUpdateTask, clock clock.Clock) (analytics.Module, error)

Types

type ConfigUpdateHttpTask

type ConfigUpdateHttpTask struct {
	// contains filtered or unexported fields
}

ConfigUpdateHttpTask polls an HTTP endpoint on a specified interval and publishes configurations until the stop channel is signaled.

func NewConfigUpdateHttpTask

func NewConfigUpdateHttpTask(httpClient *http.Client, scope, endpoint, refreshInterval string) (*ConfigUpdateHttpTask, error)

func (*ConfigUpdateHttpTask) Start

func (t *ConfigUpdateHttpTask) Start(stop <-chan struct{}) <-chan *Configuration

type ConfigUpdateTask

type ConfigUpdateTask interface {
	Start(stop <-chan struct{}) <-chan *Configuration
}

ConfigUpdateTask publishes configurations until the stop channel is signaled.

type Configuration

type Configuration struct {
	ScopeID  string          `json:"scopeId"`
	Endpoint string          `json:"endpoint"`
	Features map[string]bool `json:"features"`
}

type PubstackModule

type PubstackModule struct {
	// contains filtered or unexported fields
}

func (*PubstackModule) LogAmpObject

func (p *PubstackModule) LogAmpObject(ao *analytics.AmpObject)

func (*PubstackModule) LogAuctionObject

func (p *PubstackModule) LogAuctionObject(ao *analytics.AuctionObject)

func (*PubstackModule) LogCookieSyncObject

func (p *PubstackModule) LogCookieSyncObject(cso *analytics.CookieSyncObject)

func (*PubstackModule) LogNotificationEventObject

func (p *PubstackModule) LogNotificationEventObject(ne *analytics.NotificationEvent)

func (*PubstackModule) LogSetUIDObject

func (p *PubstackModule) LogSetUIDObject(so *analytics.SetUIDObject)

func (*PubstackModule) LogVideoObject

func (p *PubstackModule) LogVideoObject(vo *analytics.VideoObject)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL