Consent Management
Implement your own cookie consent solution for your Flipbook.
While Flipbooks does have built-in cookie consent management, we understand that some may prefer to use either their own system or a 3rd party system. On this page we have gathered useful code snippets that can assist in implementing custom cookie consent solutions using the v2 Flipbook JavaScript API.
Note:
Prior to implementing custom cookie solutions, please make sure that your Flipbook cookie policy is set to ‘Integration’.
Note:
When using a 3rd party cookie solution, please make sure that the scripts for the solution are fully loaded before you reference it / use it inside any of the Consent Management API methods. In order to avoid issues, we also recommend that you do not load the 3rd party script asynchronously (i.e. using the async keyword in the tag).
Get current cookie consent
This will return an object that represents the current cookie consent given, like the example below:
Set/Update cookie consent
When setting/updating cookie consent, you can set whether or not (true/false) to allow 3 categories of cookies: Performance, Functional, and Advertising.
Cookie consent updated callback
Using the code below you can define a callback function that will run when the cookie consent is updated/changed:
Cookie policy callback
Using the code below you can define a callback function that runs when the “Cookie Policy” button/link in the Flipbook viewer header is clicked:
Please note that by default clicking the “Cookie Policy” button will not do anything if the callback function has not been defined.
Last updated