Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Configuration

Hierarchy

  • Configuration

Index

Constructors

constructor

  • new Configuration(server: string | ConfigurationData, siteId?: number, campaigns?: {}, timeout?: number, maxRetryDelay?: number, maxAgeOfOldData?: number, persistEveryNTimes?: number, serverSideAnonymousUsage?: boolean, debug?: boolean): Configuration
  • Parameters

    • server: string | ConfigurationData
       The server URL should look like `https://myhost.example.com/ci/cleaninsights.php`.
      
    • Optional siteId: number
       The Matomo site ID to record this data for. OPTIONAL if provided via an object as first argument.
      
    • Optional campaigns: {}
       Campaign configuration. OPTIONAL if provided via an object as first argument.
      
    • Optional timeout: number
    • Optional maxRetryDelay: number
    • Optional maxAgeOfOldData: number
    • Optional persistEveryNTimes: number
    • Optional serverSideAnonymousUsage: boolean
    • Optional debug: boolean

    Returns Configuration

Properties

Readonly campaigns

campaigns: {}

Type declaration

Readonly debug

debug: boolean

Readonly maxAgeOfOldData

maxAgeOfOldData: number

Readonly maxRetryDelay

maxRetryDelay: number

Readonly persistEveryNTimes

persistEveryNTimes: number

Readonly server

server: string

Readonly serverSideAnonymousUsage

serverSideAnonymousUsage: boolean

Readonly siteId

siteId: number

Readonly timeout

timeout: number

Methods

check

  • check(debug: (message: string) => void): boolean
  • Checks configuration for some well-known problems, emits a debug message and returns false, if one found.

    Parameters

    • debug: (message: string) => void
       Function to handle the debug message.
      
        • (message: string): void
        • Parameters

          • message: string

          Returns void

    Returns boolean

    true, if config seems ok, false if known problems exist.

toString

  • toString(): string
  • Returns string

Generated using TypeDoc