• Preparing search index...
  • The search index is not available
devowl-wp
  • devowl-wp
  • frontend-packages/cookie-consent-web-client
  • apply

Function apply

  • apply(options): Promise<void>
  • Apply services on frontend. Depending on some other mechanism you can differ between the following "decision" types:

    • all: All services are applied (e. g. bots)
    • consent: All services from the current consent (read from cookie)

    The services are sent in the following way:

    1. Apply opt-in scripts (sequentially)
    2. If GTM / MTM is active, wait for the data layer a) Push all opt-in events (parallel) b) Wait x seconds to avoid side effects c) Push all opt-out events (parallel)
    3. Apply opt-in scripts (sequentially)

    Parameters

    • options: {
          type: "essentials" | "all" | "consent";
      } & Pick<CookieConsentManagerOptions, "isGcm" | "setCookiesViaManager" | "groups" | "decisionCookieName"> & ApplyOptInOptions

    Returns Promise<void>

    See

    • https://www.simoahava.com/analytics/notify-page-google-tag-manager-loaded/
    • https://support.google.com/tagmanager/answer/7679219
    • https://developer.matomo.org/guides/tagmanager/datalayer
    • Defined in ../../frontend-packages/cookie-consent-web-client/src/apply/apply.tsx:38

Settings

Member Visibility

Theme

devowl-wp
  • Loading...

Generated using TypeDoc