Cookie Consent And Embedded Content
Videos and maps from other services send your visitor's details to those services the moment they load. Canvas can show a cookie consent bar, keep those embeds behind a placeholder until the visitor agrees, and draw maps with OpenStreetMap, which needs no API key.
How To Show The Cookie Consent Bar
Starting screenCanvasTheme OptionsGDPR / Cookies.
Switch on Enable Cookie Consent Bar, then write the Cookie Bar Message and the button texts. Cookie Categories lists the kinds of cookies visitors can accept one by one in the preferences window; a category marked Required is always on. The visitor's choice is remembered for Cookie Expiry (days).
How To Hold Embeds Until A Visitor Agrees
Starting screenCanvasTheme OptionsGDPR / Cookies.
- Switch on Hold Embeds Until Consent.
- Choose the Category That Unlocks Embeds, for example the category that describes embedded video.
- Optionally change the Placeholder Message, where
%sstands for the service's name, and the Load Button Text.
Each YouTube or Vimeo video, Google map and other embedded frame then shows a placeholder of the same size, with your message and a button. Nothing is requested from the service until the visitor accepts that category in the cookie bar, or presses the button on one embed to load just that one. Once accepted, every held embed on the page appears without a reload, and later pages load embeds straight away.
Background videos are decorative, so they stay hidden until consent and show no button. Links that open a video in a lightbox load nothing until clicked, so they are not held.
How To Use OpenStreetMap Instead Of Google Maps
Starting screenCanvasTheme OptionsAPI Keys.
Choose OpenStreetMap under Map Provider. Every Canvas Map block set to follow Theme Options switches to OpenStreetMap, with the map tiles credited to their contributors as the service requires; a block that chooses its own provider in its settings keeps it. OpenStreetMap needs no API key, but it places the map and each marker by latitude and longitude, so fill those in: it does not look up addresses.
Pitfalls
- An embed still loads before consent. Check that Hold Embeds Until Consent is on and that the embed is a standard video, map or frame. An embed marked to skip consent by a developer is left alone.
- An OpenStreetMap map shows no marker. The marker has an address but no latitude and longitude.
- A Google map stays empty. Google Maps needs an API key under API Keys.
