Consent Docs

Set up your first banner

Take a new project from nothing to a consent banner for visitors in India and the first recorded answer, using the console.

Tutorial5 min readFor everyone new to the product

Take an empty project to a banner that asks visitors in India for consent and records what they answer. It takes about 30 minutes in the console, plus one script tag on your site.

Before you start#

Have these ready:

  • The address your site is served from, such as https://shop.example.in.
  • The link to your privacy policy.
  • A privacy contact email address.
  • The address of the page where a person can complain to the Data Protection Board of India.
  • Someone who can add one script tag to the site.

The quick way: Set up a site#

Open Properties and choose Set up a site. Five short steps take you from the address of your site to a published banner and its script tag. Each step saves as you go, and nothing has to be published twice. The rest of this page does the same by hand, for when you want to choose each detail.

Create a property#

A property is one site or app. Its consent forms, keys and records belong to it.

  1. Open the console at https://console.dpconsent.com.
  2. Open Properties and choose New property.
  3. Enter a Name, such as shop.example.in.
  4. Under Website addresses, enter each address the site is served from, one per line.
  5. Enter the Privacy policy URL.
  6. Choose Create property.
The New property panel with a name, origins and privacy policy link filled in
The New property panel with a name, origins and privacy policy link filled in

The console confirms with Property created. The property now has a card under Properties.

Add your privacy contact#

A form shown in India cannot be published without a privacy contact.

  1. Open Settings.
  2. Under Identity, enter the Privacy contact email address.
  3. Choose Save settings.

The console confirms with Settings saved.

Add your purposes#

A purpose is one reason you use personal data, such as analytics. The project keeps its purposes in one list, the purpose registry. A new form starts with every purpose in it, so add them first.

  1. Open Settings, then Purposes.
  2. Choose Add from library.
  3. Tick Strictly necessary, Analytics and Marketing, and choose Add selected.
  4. Select Analytics and check its Description, Data used and Partners against what your site does.
  5. Choose Remove beside each partner you do not work with, then choose Save changes.
  6. Do the same for Marketing.
  7. Select Strictly necessary and choose a clause under Legitimate use relied on in India (DPDP Act section 7).
  8. Choose Save changes.

The list now shows three purposes. Strictly necessary is not based on consent, so a notice in India has to name the legitimate use it relies on. Which clause fits is your decision. Add purposes explains every field.

A consent form holds what you ask and the wording you ask it in. The banner is one type of form.

  1. Check that the property picker, at the left of the tab bar, shows your property.
  2. Open Consent forms and choose New consent form.
  3. Choose Cookie and tracking consent.
  4. In Wording, change the Form name, Heading and Body to suit your site.
  5. Fill in Complaint link text and Complaint link URL.
  6. Choose Save draft.
A new consent form as a draft, with its checklist, the Purposes and Wording panels and the live preview
A new consent form as a draft, with its checklist, the Purposes and Wording panels and the live preview

The form is a draft with your three purposes and a live preview of the banner. Visitors in India see the complaint link, which tells them how to complain to the Data Protection Board of India.

Publish#

Visitors only ever see a published version, never the draft.

  1. At the top of the form, choose Publish version 1.
  2. Choose Publish version 1 again to confirm.

The console confirms with Published version 1.

Choose where the form is shown#

A region rule shows a form to visitors from the places it covers.

  1. At the top of the form, choose Regions.
  2. Under Add a law, choose DPDP.
  3. Choose Everywhere else.

The form now has a rule for India, set to opt-in, and a rule for every other country. Rules take effect at once. If something a notice in India needs is missing, the console does not add the DPDP rule and says what is missing. Add it, publish the form again, then add the rule.

Countries without a rule see no banner

Visitors from a country that no rule covers are not asked, and your tags are not held back for them.

If the project's translation service is ready, the console also drafts the notice in India's 22 scheduled languages. Add Indian languages shows how to review and publish them.

Create a key#

The key connects your site to this property.

  1. Open Install and choose New key.
  2. Enter a Name that says where the key is used, such as Shop website.
  3. Check Allowed origins. They are filled in from the property.
  4. Choose Create key.

The Key created panel shows the Publishable key and an Identity secret. The identity secret is shown only once. Your developer needs it only to record consent under a signed-in visitor's account.

A new key is a test key. It works on localhost and on the origins you listed, and its records are kept apart from live data.

Install the snippet#

The snippet is one script tag that loads the banner on your site.

  1. On Install, find Your snippet and keep Script tag selected.
  2. Choose Copy. The copied snippet contains your full key.
  3. Ask your developer to paste it as the first thing inside <head>, without async or defer.

Once the tag is on your site, the banner appears on a visitor's first visit.

The Install page with the Script tag snippet and the Keys panel
The Install page with the Script tag snippet and the Keys panel

Check what a visitor gets#

Try the runtime asks the same question your site asks: which form does a visitor from this place get?

  1. On Install, find Try the runtime.
  2. In the first box, replace the country code with IN.
  3. Choose Send.

You see the name of your form with OPT_IN and DPDP beside it, and a sentence saying which rule matched.

See the first record#

  1. Open your site in a browser, on one of the key's allowed origins.
  2. Answer the banner.
  3. In the console, open Records.
  4. Choose Show test records. The list starts on live records only.

The answer appears as a new row marked Test. Select it to see what was allowed, which form and version were shown, and the proof.

The Records list with one new record marked Test
The Records list with one new record marked Test

If no banner appears, see Banner and tag problems.

Next steps#

↑↓ to move, Enter to open