Hopp til innhold

Without WordPress

A lawful cookie banner on any website

You do not need WordPress to use Samtykkr. On any other website you paste one line of code into the page head, and the same lawful banner renders: Consent Mode v2 denied by default, equal Accept and Reject, and tracking held back until the visitor has chosen. The choice is stored on the visitor's device, and we only count choices per day.

The line you put at the top of the <head>:

<script src="https://app.samtykkr.no/v1/loader.js?site=DIN-NOKKEL"></script>

Replace DIN-NOKKEL with the public key you get in the customer area at app.samtykkr.no. The line must come before all other scripts and without async, or it cannot stop tracking in time. Scripts hardcoded in your HTML do not run and set no cookies before consent, but the browser may fetch the file ahead of time. To stop that too, give the tag type='text/plain' and data-nf-consent='statistics' or 'marketing'. Stylesheets such as Google Fonts cannot be marked this way, so self-host them or load them after consent. The same goes for tracking pixels in an image. The page waits for this file before it shows. If we are slow we answer with a standard banner, but if we are fully down the page waits until the browser gives up. If the page must never wait, keep async, but tracking can then start before the blocking does.

How to do it

  1. 1Buy a plan at app.samtykkr.no. The snippet is part of Pro.
  2. 2Add your website in the customer area and copy the snippet with your own key.
  3. 3Paste the line at the top of the <head> of your website, before all other scripts.

Platforms

The snippet works anywhere you can add a line to the page head, including:

  • Shopify
  • Wix
  • Squarespace
  • Webflow
  • Custom-coded sites

Privacy built in

The banner stores the visitor's choice on their own device. The banner is fetched from our cloud, so our provider sees the IP address when the file loads, as with any web service. We store nothing about the individual visitor, only the number of choices per day. Banner and rules are the same as in the WordPress plugin. The difference is that you get no consent log on your own server, because that requires WordPress.

Ready to start?