.. include:: ../Includes.txt ============= Cookie Services ============= A cookie service allows for the management of scripts, cookies, and iframes. For example: :guilabel:`Thirdparty Scripts and Iframe Manager`. .. figure:: ../../Images/Ui/backend_servicedetailview.png :class: with-shadow :alt: Backend Consentmodal :width: 100% Global Settings =============== - :guilabel:`name` Display Name in Frontend - :guilabel:`identifier` System Identifier (do not change) - :guilabel:`description` Service Description - :guilabel:`provider` Provider URLS seperated by "," - :guilabel:`dsgvo_link` Link to Service AGB's - :guilabel:`category_suggestion` Used for simple MM Selection Iframe Manager --------------------- The iframe manager is responsible for blocking third-party content. In the field, :guilabel:`iframe_notice` text is stored that the user sees when the content is blocked. - :guilabel:`iframe_load_btn` Loads the Content of current Div - :guilabel:`iframe_load_all_btn` Loads all Content from same Service on same site Advanced Iframe Configuration --------------------- :guilabel:`iframe_thumbnail_url` set valid url for automatic thumbnails or use a Javascript function :guilabel:`iframe_embed_url` is called on Successful Accept can also use a Javascript function Example Iframe Thumbnail function .. code-block:: javascript :linenos: function(id, callback){ let parts = id.split("/"); let videoId = parts[parts.length - 1]; let videoIdParts = videoId.split("?"); let videoIds = videoIdParts[0]; var url = "https://vimeo.com/api/v2/video/"+videoIds +".json"; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { var src = JSON.parse(this.response)[0].thumbnail_large; callback(src); } }; xhttp.open("GET", url, true); xhttp.send(); } Script Configuration --------------------- OptInCode :guilabel:`opt_in_code` is executed when the user accepts the service. By default, some services do not have an OptInCode as cookie management happens automatically based on the assigned cookies. This code is only needed to execute additional JavaScript when the user accepts the service. OptOutCode :guilabel:`opt_out_code` is executed when the user block the service. By default, some services do not have an OptOutCode as cookie management happens automatically based on the assigned cookies. This code is only needed to execute additional JavaScript when the user block the service. Fallback Code [fallback_code] is not in use, TODO. External Script Configuration --------------------- External scripts are used for example for Google Analytics. Including these is easy, here is how to create an external script. .. figure:: ../../Images/Ui/backend_servicescript.png :class: with-shadow :alt: Backend Consentmodal :width: 100% Fields: - :guilabel:`name` Display and lable name - :guilabel:`link` The external link - :guilabel:`async` Embed the script tag asynchronous .. tip:: You can provide GET parameters like in this Example: :guilabel:`https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX` Variable Provider =============== Variable providers detect defined variables in the fields :guilabel:`opt_in_code` :guilabel:`opt_out_code` :guilabel:`fallback_code`. A variable is declared with the :guilabel:`[##` and closed with :guilabel:`##]`. In the Google Analytics service you find this example: :guilabel:`[##googleTagManagerID##]` Replace :guilabel:`G-XXXXXXXX` with your Google Tag manager ID. .. figure:: ../../Images/Ui/backend_servicevariableprovider.png :class: with-shadow :alt: Backend Consentmodal :width: 100% Fields: - :guilabel:`name` Display and lable name - :guilabel:`identifier` the Variable in the `[##myvariable##]` like myvariable - :guilabel:`value` The stored string .. toctree:: :maxdepth: 5 :titlesonly: ExampleServices/Index