Hierarchy

  • Campaign

Constructors

  • Parameters

    • start: Dayjs | CampaignData

      The start of the campaign. (inclusive)

    • Optional end: Dayjs

      The end of the campaign. (inclusive) OPTIONAL if provided via an object as first argument.

    • Optional aggregationPeriodLength: number

      The length of the aggregation period in number of days. At the end of a period, the aggregated data will be sent to the analytics server. OPTIONAL if provided via an object as first argument.

    • Optional numberOfPeriods: number
    • Optional onlyRecordOnce: boolean
    • Optional eventAggregationRule: EventAggregationRule
    • Optional strengthenAnonymity: boolean

    Returns Campaign

Properties

aggregationPeriodLength: number
end: Dayjs
eventAggregationRule: EventAggregationRule
numberOfPeriods: number
onlyRecordOnce: boolean
start: Dayjs
strengthenAnonymity: boolean

Accessors

  • get aggregationPeriod(): Duration
  • Returns Duration

  • get currentMeasurementPeriod(): null | {
        end: Dayjs;
        start: Dayjs;
    }
  • Returns the current measurement period, aka. the period where NOW is in.

    If NOW is outside any possible period, because the campaign hasn't started, yet, or already ended, will return null.

    The first period is defined as aggregationPeriodLength number of days after the start of the campaign.

    Returns null | {
        end: Dayjs;
        start: Dayjs;
    }

  • get nextTotalMeasurementPeriod(): null | {
        end: Dayjs;
        start: Dayjs;
    }
  • Returns null | {
        end: Dayjs;
        start: Dayjs;
    }

Methods

  • Apply the eventAggregationRule to the given event with the given value.

    Parameters

    • event: Event

      The event to apply the value to.

    • Optional value: number

      The value to apply.

    Returns void

Generated using TypeDoc