libconsent

Service catalog

The services libconsent already knows, and how to add one it doesn't.

These services need nothing but their id:

<CookieService id="hotjar">
  <HotjarSnippet />
</CookieService>

The category, the label in the preferences dialog and the other names consent platforms use for that service all come with the id.

essential

idShown asAlso matches
recaptchaGoogle reCAPTCHAGoogle reCAPTCHA, Google Recaptcha, reCAPTCHA v3
sentrySentry—
stripeStripeStripe.com

functional

idShown asAlso matches
google-mapsGoogle Maps—
google-fontsGoogle Fonts—
intercomIntercom—

analytics

idShown asAlso matches
google-analyticsGoogle AnalyticsGoogle Analytics 4, GA4, gtag, Universal Analytics
google-tag-managerGoogle Tag ManagerGTM
hotjarHotjarHotJar.com
clarityMicrosoft ClarityClarity
matomoMatomoPiwik
plausiblePlausible Analytics—
posthogPostHog—
mixpanelMixpanel—
segmentSegmentSegment.io

marketing

idShown asAlso matches
google-adsGoogle AdsGoogle AdWords, Google Advertising Products, DoubleClick
youtubeYouTubeYouTube Video, YouTube Embed
vimeoVimeoVimeo Player
meta-pixelMeta PixelFacebook Pixel, Facebook (Meta), Meta Platforms
linkedin-insightLinkedIn Insight TagLinkedIn, LinkedIn Ads
tiktok-pixelTikTok PixelTikTok, TikTok Ads
microsoft-adsMicrosoft AdvertisingBing Ads, Microsoft UET
hubspotHubSpotHubSpot CRM

Overriding an entry

Anything you pass yourself wins — a different category, a different label, or an extra name your platform happens to use:

<CookieService id="youtube" category="functional" name="Video player">
  <YouTubeEmbed />
</CookieService>
<CookieService id="google-analytics" aliases={["Google Analytics (GA4)"]}>
  <GoogleAnalytics gaId="G-XXXXXXX" />
</CookieService>

Services that aren't listed

Describe it inline. id is yours to choose, name is what the preferences dialog shows, and category decides what gates it.

<CookieService id="acme-chat" name="Acme Chat" category="functional">
  <AcmeChat />
</CookieService>

If your consent platform calls it something else, add that as an alias — then the platform's own answer for that service is used instead of the category:

<CookieService
  id="acme-chat"
  name="Acme Chat"
  category="functional"
  aliases={["Acme Live Chat"]}
>
  <AcmeChat />
</CookieService>

Repeating that in several places gets old, so pull it out:

lib/services.ts
export const acmeChat = {
  id: "acme-chat",
  name: "Acme Chat",
  category: "functional",
  aliases: ["Acme Live Chat"],
} as const;
<CookieService {...acmeChat}>
  <AcmeChat />
</CookieService>

Missing something common? The catalog is one object entry per service in packages/core/src/services.ts — pull requests welcome.

On this page