Skip to main content

Documentation

Everything you need to integrate SnapConsent into your website

Quick Start

1. Create Account

Sign up for a free account and create your first site

Get Started

2. Customize Banner

Design your consent banner to match your brand

Learn More

3. Add to Website

Copy and paste one line of code to your website

View Code

Installation

Add to your website

Add this script tag before the closing </head> tag on every page:

<script src="https://cdn.snapconsent.com/v1/consent.js"
  data-site-id="YOUR_SITE_ID"
  async></script>

Replace YOUR_SITE_ID with your actual site ID from the dashboard.

Google Tag Manager

For GTM integration, add a Custom HTML tag with:

  1. Create a new Custom HTML tag
  2. Paste the SnapConsent script
  3. Set trigger to "All Pages"
  4. Enable Google Consent Mode v2 in settings

API Reference

JavaScript API

Programmatically control the consent banner

snapconsent.show()
snapconsent.hide()
snapconsent.getConsent()

Events

Listen to consent events

consent_given
consent_updated
consent_declined

Configuration Options

OptionTypeDescription
positionstringBanner position: bottom, top, center
themestringColor theme: light, dark, auto
languagestringDefault language: en, es, fr, de
autoShowbooleanAuto-show banner for EU visitors

Need Help?

Our support team is here to help you get started