Class ConsentRequestUi

Implement this to provide a UI which explains your campaigns.

Questions you should answer to the user:

  • Why do you need these measurements?
  • How long will they get collected?
  • What might attackers learn from these numbers?
  • How long will you store them on your servers?
  • What are you going to do with these measurements?
  • How will the user benefit from these measurements?

Hierarchy

  • ConsentRequestUi

Constructors

Methods

  • Will be called if it is necessary to ask the user for consent to a measurement campaign.

    Parameters

    • campaignId: string

      The campaign identifier.

    • campaign: Campaign

      The campaign configuration.

    • complete: ((granted) => void)

      The callback which will store the consent or the denial of it.

        • (granted): void
        • Parameters

          • granted: boolean

          Returns void

    Returns string

    HTML output to show to the user, in case the user needs to get asked for consent.

  • Will be called if it is necessary to ask the user for consent to record a common feature while measuring a campaign.

    Parameters

    • feature: Feature

      The feature to record. (e.g. user agent, locale)

    • complete: ((granted) => void)

      The callback which will store the consent or the denial of it.

        • (granted): void
        • Parameters

          • granted: boolean

          Returns void

    Returns string

    HTML output to show to the user, in case the user needs to get asked for consent.

Generated using TypeDoc