Aller au contenu
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Loading in SPIP

The Sirdata CMP plugin for SPIP automatically inserts the CMP tag at the very beginning of the <head> of every public page of your website. It is compatible with SPIP 3.2 to 4.x.

2 methods are available: with the plugin or directly in your templates 👍

1) Download the plugin

archive · 26KB
Ouvrir

2) Install the plugin

Unzip the archive and upload the sirdatacmp folder into the plugins/ folder at the root of your SPIP website (via FTP/SFTP or your hosting provider's file manager). Create the plugins/ folder if it does not exist.

3) Enable the plugin

In the SPIP private area, go to Configuration → Manage plugins, Inactive tab, then click Enable next to "Sirdata CMP".

Sirdata CMP plugin in SPIP plugin management
Enable the plugin

4) Configure your CMP

Click Configure next to the plugin (or go to Configuration → Sirdata CMP). This page is restricted to the website webmasters.

Configure button of the Sirdata CMP plugin
Open the settings

Fill in:

  • your Partner ID and Config ID, which you can find in your account. They are the two IDs in the tag URL: https://choices.consentframework.com/js/pa/PARTNER_ID/c/CONFIG_ID/cmp;

  • tick Enable Sirdata CMP on the public website, then click Save.

Sirdata CMP plugin settings form
Fill in the Partner ID and Config ID

No need to empty the SPIP cache: the tag is added every time a page is displayed, so changes apply immediately.

Your visitors must be able to revisit and change their choices at any time. The plugin provides a model that displays a link re-opening the CMP (window.Sddan.cmp.displayUI()):

  • in the text of an article, for instance your privacy policy: <sirdatacmp|> or, with a custom text, <sirdatacmp|texte=Cookie settings>;

  • in a template, for instance the footer squelettes/inclure/footer.html: [(#MODELE{sirdatacmp, texte=Manage cookies})] (optional class parameter for styling).

Manage cookies links displayed by the sirdatacmp model
The model displayed in an article

And that's it, your Sirdata CMP is deployed on your SPIP website!

Check the installation

Display the source code of a public page of your website: the https://cache.consentframework.com/js/pa/PARTNER_ID/c/CONFIG_ID/stub and https://choices.consentframework.com/js/pa/PARTNER_ID/c/CONFIG_ID/cmp scripts must appear at the very top of the <head>, before any other script: right after the <head> tag, or right after the <meta charset> tag if your <head> starts with it.

Good to know:

  • the tag is never added to the SPIP private area, nor to RSS feeds;

  • if the tag is already in your templates (method B), the plugin does not add it a second time;

  • disabling the plugin removes the tag; Actions → Uninstall also deletes its settings.

Method B - Directly in your templates

You can also copy / paste the Sirdata CMP tag into the <head> of your templates, as high as possible and before any other script.

With the SPIP default templates:

  1. if the squelettes/inclure/head.html file does not exist, copy squelettes-dist/inclure/head.html into the squelettes/inclure/ folder (create it if needed);

  2. paste the tag at the very top of this file;

  3. empty the SPIP cache: Maintenance → Empty the cache.

And that's it, your Sirdata CMP is deployed on your SPIP website!

Mis à jour

Ce contenu vous a-t-il été utile ?