Overview

Installing Consently on your website is a one-time setup that enables your consent banner to collect visitor preferences and manage cookies. The installation process involves adding a single JavaScript snippet to your site, which can be done through various methods depending on your technical setup and platform.


How the Consently Script Works

The Consently script is a lightweight JavaScript file hosted at https://app.consently.net/consently.js that loads asynchronously on your website. When a visitor arrives, the script displays your cookie banner, detects cookies on your site, records consent choices, and enforces cookie auto-blocking rules based on visitor preferences. The script identifies your specific banner configuration using a unique banner ID passed through the data-bannerid attribute. 

Once installed, the script automatically:

  • Detects when visitors return to your site and remembers their consent preferences

  • Blocks non-essential cookies until consent is granted

  • Syncs consent states across all pages of your website

  • Updates when you publish banner changes from the Consently dashboard


Installation Methods

Consently supports multiple installation approaches to fit different technical environments:

Direct HTML Installation

Paste the embed script directly into your website's HTML <head> section. This method works for any website and gives you direct control over script placement. See Direct HTML Installation for the complete process.

Google Tag Manager

Deploy Consently through GTM using a Custom HTML tag. This method is ideal if your site already uses GTM for managing marketing and analytics scripts. Learn more in Google Tag Manager Installation.

Platform-Specific Installation

Popular website platforms like Dorik, WordPress, Shopify, Wix, and others have specific installation locations for adding scripts. Consently provides tailored instructions for the following platforms:


Script Loading Behavior

The Consently script loads asynchronously, meaning it won't block your website's content from appearing while the script initializes. This ensures your site remains fast and responsive. The banner typically appears within milliseconds of page load, and the script begins scanning for cookies immediately upon initialization.

Your banner configuration is linked to your script through the banner ID. When you make changes in the Consently dashboard and click Save, those changes take effect on your live site automatically—no need to update the script itself.


Before Installing

Make sure you've:

Time required: About 5 minutes


Getting Started

Begin with the Direct HTML Installation guide to get your embed script and install it on your website.


Related Topics