Here you can find a complete list of all shortcodes for Borlabs Cookie 2.0.
User-ID
This allows you to display the visitor's UID. The visitor can tell you the UID so that you can retrace their consent history.
Shortcode
[borlabs-cookie type="uid"/]
Result
Cookie Selection
The shortcode shows a button that the visitor can use to open the cookie selection to change their consent. You can use the title attribute to specify the name of the button.
Shortcode
[borlabs-cookie type="btn-cookie-preference" title="Lorem ipsum"/]
Result
Shortcode
[borlabs-cookie type="btn-cookie-preference" title="Lorem ipsum" element="link"/]
Result
Cookie List
You can use the shortcode to display a list of all cookie information in your privacy statement. Very useful if you want to provide cookie documentation.
Shortcode
[borlabs-cookie type="cookie-list"/]
Result
Consent History
The shortcode shows the visitor their consent history.
Shortcode
[borlabs-cookie type="consent-history"/]
Result
Block content
Content Blocker
Automatic detection
The content enclosed by the shortcode is blocked.
If there is an iframe or URL that supports the oEmbed standard between the shortcode, Borlabs Cookie tries to find the correct Content Blocker.
If no Content Blocker can be determined, the content is blocked using the Default Content Blocker.
[borlabs-cookie type="content-blocker"]Content to be blocked[/borlabs-cookie]
Manual Iframe Blocking
If you put the shortcode around an iframe, it will be blocked. The id attribute can be used to specify the content blocker that Borlabs Cookie should use to block the iframe.
The title attribute is optional and can overwrite the name of the Content Blocker. The title is used in some Content Blockers in the Preview Blocked Content field and replaces the variable %%name%%.
[borlabs-cookie type="content-blocker" id="googlemaps" title="Google Maps"]<iframe src="https://www.google.com/maps/embed..."></iframe>[/borlabs-cookie]
Manual iframe blocking - YouTube example
The variables in the Content Blocker preview can be overwritten by specifying the attribute. In this example, the thumbnail attribute overrides the preview image of a YouTube video.
[borlabs-cookie type="content-blocker" id="youtube" thumbnail="https://de.borlabs.io/wp-content/uploads/sites/2/2021/09/best-test-image-in-the-universe.jpg"]<iframe src="https://www.youtube.com/embed/84pno0_xOv4"></iframe>[/borlabs-cookie]
You are currently viewing a placeholder content from Default. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationManual oEmbed Blocking
If you put the shortcode around a URL that supports the oEmbed standard, the content will be loaded and blocked. The id attribute can be used to specify the Content Blocker Borlabs Cookie should use for blocking.
The optional title attribute can also be used here (see Manual Iframe Blocking).
[borlabs-cookie type="content-blocker" id="facebook" title="Facebook"]https://www.facebook.com/Borlabs/[/borlabs-cookie]
Cookie
The blocked content will only be unblocked if the visitor has agreed to the Cookie.
The id attribute is used to link the blocked content to the Cookie.
Alternatively, click on the Edit icon of a cookie in Borlabs Cookie and you will be shown the appropriate shortcode.
[borlabs-cookie type="cookie" id="google-analytics"]My code / content[/borlabs-cookie]
Cookie Group
The blocked content will only be unblocked if the visitor has consented to the Cookie Group.
The id attribute links the blocked content to the Cookie Group.
Alternatively, click on the Edit icon of a Cookie Group in Borlabs Cookie and you will be shown the appropriate shortcode.
[borlabs-cookie type="cookie-group"]My code / content[/borlabs-cookie]
Opt-in / Opt-out
The shortcode displays a switch button that gives your visitor an easy way to give or revoke consent to a Cookie.
For the id attribute, the ID of the Cookie for which the Opt-in / Opt-out is to be offered must be specified.
The title attribute is optional, by default the name of the Cookie is used.
Shortcode
[borlabs-cookie type="btn-switch-consent" id="google-analytics" title="Google Analytics"/]