Openli
IntroductionGetting StartedTechnical DocumentationGet help
  • Getting started
    • Introduction
    • Dictionary
    • FAQ
      • IAB TCF v2.0
  • Privacy hub
    • How to create your privacy profile
    • How can I get an Openli Privacy Badge?
    • Vendor owners
    • Why are custom properties on vendors super valuable?
    • Setting up custom properties
  • Tasks
  • Cookie Consent Management
    • Quickstart
    • Checklist: Cookies
    • Cookie widget
      • Create a cookie policy
      • Create a cookie widget
      • Install the widget
      • Manually add any cookies
      • Customise your widget
      • How to get color codes
      • Set the widget language
      • Use custom link/button instead of Cookie Shield
      • Add company name to cookie pop-up
    • Categorise your cookies
    • Adding information to cookies
    • Adding information to your cookie providers
    • Blocking Cookies with Openli
    • Cookie expiration dates and lifespan
      • Changing expiration on Google Analytics cookies
  • Policy and agreement management
    • Generate your privacy policy
    • Changing an old cookie policy to a new on autopilot
    • Embed your policies and legal agreements
      • Embedding agreements without displaying a widget
    • Install the Privacy Badge
  • General Openli guides
    • Setting up SSO (Single Sign-On)
      • SSO with Azure AD (Microsoft)
      • SSO with Google
      • SSO with Okta
      • How to log in with SSO
    • Add a website to your Openli account
    • Using projects to handle multiple languages
    • Collect consents without storing IP addresses or user-agents
  • Technical documentation
    • Widget
      • Collect cookie consent
        • Blocking cookies
        • Blocking embedded media
        • Cookie-widget options
        • Consent state API
    • API
      • Services
        • Personal data
        • Subprocessors
    • Cookies set by Openli
  • System Specific Integration Guides
    • Cloudflare
  • Legacy integrations
    • Google Consent Mode
    • Google Tag Manager
      • Block cookies with GTM
      • Install Openli with GTM
      • Prevent triggers from firing in GTM
    • HubSpot
    • Pardot
    • Shopify
      • Install cookie widget
      • Integrate consent with checkout
    • Square Online
    • Squarespace
    • Webflow
    • Wix
Powered by GitBook
On this page
  1. Policy and agreement management

Install the Privacy Badge

The privacy badge is a widget that gives you the ability to showcase your privacy policy in a different value while building trust with your users.

PreviousEmbedding agreements without displaying a widgetNextSetting up SSO (Single Sign-On)

Last updated 3 years ago

Setup your privacy badge

  1. log in to your Openli account

  2. go to agreements and find the key for the agreement you want to link to the badge (Typically it would be your privacy policy).

  3. If you don't have a agreement to choose from, follow the guide "Upload your terms". If you have already uploaded your privacy policy, you simply use the key for that agreement. Hold on to that key, We will need it in a moment.

  4. Once you've selected an agreement, install this piece of code on your website just below your Openli cookie widget script:

<script>
  legal.widget({
    type: "privacy-badge-v1",
    agreementPublicKey: "YOUR_POLICY_KEY_HERE",
    targetElementSelector: "#privacy-badge",
  });
</script>

It is important it loads after the cookie widget script, as the script enables the badge functionality.

Make sure you replace the placeholder above with the public key of the policy you want to link to (the one we found earlier), from your Openli app. 5. Then place this div where you want the badge to show on your website. For example in the footer.

<div id="privacy-badge"></div>

Once this is done, the badge will show in the div when the page is loaded and you will be proudly displaying to the world that you care about your users privacy.