Algolia Integration
The Algolia integration in Consent Manager doesn't directly integrate scripts from Algolia. Instead, it's designed to manage user consent for sending data to Algolia. This allows users to utilize Algolia's search functionalities in a GDPR-compliant manner.
Title | Algolia |
ID | algolia |
Icon | |
Brand color | #003DFF |
Contrast color | #fff |
Description | We use Algolia to provide you a high performant and feature-rich search experience. |
Privacy policy | https://www.algolia.com/policies/privacy/ |
WrapperComponent | ⛔️ |
Enabled by default | ⛔️ |
Managing Consent for Algolia
To control the loading of any Algolia search integration based on user consent, you can use the useDecision
hook from Consent Manager Core or the PrivacyShield
component.
Example: Conditional Loading of Algolia Search with the Privacy Shield component
Here's an example of how you can conditionally load an Algolia search component based on user consent:
import React from 'react';
import { PrivacyShield } from '@consent-manager/core';
import AlgoliaSearchComponent from './AlgoliaSearchComponent';
function SearchWithConsent() {
const [algoliaConsent] = useDecision('algolia');
return (
<PrivacyShield id="algolia">
<AlgoliaSearchComponent />
</PrivacyShield>
);
}
export default SearchWithConsent;