How to Add a Button or Link to Reopen the Cookie Consent Banner
If you want to let visitors reopen the cookie consent banner, you can easily set up a button or link. You just need to add specific attributes to the button or link. Here’s how to do it:
Step 1: Understand the Options
To make the button or link work, you can use any of the following attributes:
- Link with a specific
href
value:
Addhref="#bt-open-banner"
to a link or button.
- Custom data attribute:
Adddata-bt-open-banner
to your link or button.
- Element ID:
Useid="bt-open-banner"
for your element.
- CSS Class:
Addclass="bt-open-banner"
to your element.
Step 2: Choose the Right Option for Your Website
Here are some examples to match different styles or needs:
Option 1: A Simple Link<a href="#bt-open-banner">Reopen Cookie Banner</a>
Option 2: A Button with a Data Attribute<button data-bt-open-banner>Reopen Cookie Banner</button>
Option 3: A Button with an ID<button id="bt-open-banner">Reopen Cookie Banner</button>
Option 4: A Button with a Class<button class="bt-open-banner">Reopen Cookie Banner</button>
Step 3: Add the Code to Your Website
Find the Right Place:
Locate where you want the button or link to appear on your site (e.g., footer, sidebar, or a settings page).
Add the Code:
Open your website editor (e.g., WordPress, Wix, or another platform).
Insert one of the examples above into your website.
Save and Publish:
Save the changes and update your website.
Step 4: Customize (Optional)
Change the Text:
Modify the text inside the button or link to match your preference:<button data-bt-open-banner>Update Cookie Preferences</button>
Style the Button:
Use your website’s tools to adjust the size, color, or style of the button or link.
Step 5: Test the Button or Link
- Open your website in a browser.
- Click the new button or link you added.
- The cookie consent banner should appear, allowing users to update their preferences.
With these steps, you can easily add a button or link to reopen the cookie banner, ensuring your visitors can always manage their cookie preferences. If you need further assistance, feel free to contact our support team!