Hi Krissieg,
Thank you for reaching out, after taking a look at your site along with the button code, we’ve identified the issue.
When modifying the preference center button UI, make sure to retain all of the class information. In this case, onclick=”displayPreferenceModal()” was deleted from your preference center button.
You can either regrab the code from the Embed preference center page or copy the default code below.
<button
class="termly-cookie-preference-button"
type="button"
style="background: white; width: 165px; height: 30px; border-radius: 3px; border: 1px solid #5f7d9c; font-family: Roboto, Arial; font-size: 10px; color: #5f7d9c; font-weight: 600; box-sizing: border-box; cursor: pointer; padding: 0; outline: none;"
onclick="displayPreferenceModal()"
>
Manage Cookie Preferences
</button>
Thank you,
The Termly Team
Thanks, I copied your code exactly and it still doesn’t work?
Hi Krissieg,
I just took another look at the new button implemented, it looks like you’re still missing the onclick portion.
Here is a screenshot of the live code on your site.
Preference center code
I would suggest moving the button out of the paragraph tags <p> or other divs. Inserting it into the footer is the most common placement for this feature.
Yes, me adding the code in its own section has worked. Thank you for your help! 🙂