Callbacks
Learn how to use callbacks to respond to c15t events in your Next.js application.
Implementing Callbacks
Due to the nature of Next.js App Directory, we have to define callbacks to run in a client component.
Info
Ensure you import this component inside the ConsentManagerProvider component in your app/layout.tsx file.
Available callbacks
onBannerFetched
Called when the consent banner is fetched; not invoked when the banner is in offline mode.
Property
Types
onConsentSet
Called when the consent is set.
Property
Types
onError
Called when an error occurs.
Property
Types