Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

constructor

Methods

showForCampaign

  • showForCampaign(campaignId: string, campaign: Campaign, complete: (granted: boolean) => void): string
  • 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: boolean) => void
       The callback which will store the consent or the denial of it.
      
        • (granted: boolean): 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.

showForFeature

  • showForFeature(feature: Feature, complete: (granted: boolean) => void): string
  • 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: boolean) => void
       The callback which will store the consent or the denial of it.
      
        • (granted: boolean): 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