> For the complete documentation index, see [llms.txt](https://cmp.docs.sirdata.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmp.docs.sirdata.net/en/install/in-a-cms/loading-in-spip.md).

# 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 :thumbsup:

### Method A - With the Sirdata CMP plugin (recommended)

#### 1) Download the plugin

{% file src="/files/SXissb2K0JoycKSL1ugi" %}

#### 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".

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2Fgit-blob-8d3f479ace7b4a85c19a5a2f5af47b7c471f005c%2Fspip-1-activer-en.png?alt=media" alt="Sirdata CMP plugin in SPIP plugin management"><figcaption><p>Enable the plugin</p></figcaption></figure>

#### 4) Configure your CMP

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

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2Fgit-blob-9db52c34744a9f75ae89e5ad60713be83b150511%2Fspip-2-configurer-en.png?alt=media" alt="Configure button of the Sirdata CMP plugin"><figcaption><p>Open the settings</p></figcaption></figure>

Fill in:

* your **Partner ID** and **Config ID**, which you can find in [your account](https://cmp.sirdata.io). 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**.

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2Fgit-blob-3c678c5ec4eb7adaf108858831fc1bcffe066192%2Fspip-3-configuration-en.png?alt=media" alt="Sirdata CMP plugin settings form"><figcaption><p>Fill in the Partner ID and Config ID</p></figcaption></figure>

{% hint style="info" %}
No need to empty the SPIP cache: the tag is added every time a page is displayed, so changes apply immediately.
{% endhint %}

#### 5) Add the link to re-surface the CMP

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).

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2Fgit-blob-fadb6e2766c5b85629301fd0966c5490323314d0%2Fspip-4-modele-en.png?alt=media" alt="Manage cookies links displayed by the sirdatacmp model"><figcaption><p>The model displayed in an article</p></figcaption></figure>

{% hint style="warning" %}
If you hide the CMP icon with the **"Manage in the footer"** option, the link must be present in the HTML as soon as the page loads: put it in the footer template. See [Manually display the CMP](https://cmp.docs.sirdata.net/en/advanced-features/manually-display-cmp.md).
{% endhint %}

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](https://cmp.docs.sirdata.net/en/install/web-and-mobile-web.md) 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**.

{% hint style="warning" %}
Do not change the synchronous logic of the first script (`stub`): no `async` or `defer` attribute.
{% endhint %}

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cmp.docs.sirdata.net/en/install/in-a-cms/loading-in-spip.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
