---
title: "Consent Management"
canonical_url: "http://localhost/consent-management"
---
# Consent Management

## Loading embeds after consent

If your website asks visitors for consent before loading external content, you can load any stafftastic embed (praktikum.io Posting Embeds, praktikum.io Spaces and praktikum.io Organization Posting Embeds) only after consent has been given. Until the script is loaded, the visitor's browser does not connect to stafftastic. The container elements can be part of your page from the start, they stay empty until the embed is loaded.

Embeds start as soon as their script runs, so they also work when the script is added after the page has finished loading. Keep the following in mind:

- The script has to be loaded as a module (`type="module"`). Many consent managers switch blocked scripts to `type="text/javascript"` when unblocking them, and the embed will not start in that case. If yours does, add the script yourself from its consent callback instead.
- Only one `<script>` element per embed may be on the page. If your consent manager keeps a blocked copy of the script next to the unblocked one, the embed stops with an error in the browser console.
- The container elements have to be on the page when the script runs. Containers added later are not filled.

To add the script from a consent callback, create it with the same attributes as the regular snippet. For a praktikum.io Posting Embed this looks like this:

```javascript
const script = document.createElement('script');
script.type = 'module';
script.src = 'https://embed.stafftastic.com/praktikumio/postings.js';
script.dataset.embedId = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';
document.body.appendChild(script);
```

For the other embeds, use their script URL and set `data-space-id` or `data-embed-id` and `data-target` accordingly (`script.dataset.spaceId`, `script.dataset.target`).

## Differences between embeds

<table>
<thead>
  <tr>
    <th>
      Embed
    </th>
    
    <th>
      Script
    </th>
    
    <th>
      Container
    </th>
    
    <th>
      Third-party services
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      praktikum.io Posting Embeds
    </td>
    
    <td>
      <code>
        postings.js
      </code>
    </td>
    
    <td>
      Every element with <code>
        data-praktikumio-postings
      </code>
    </td>
    
    <td>
      None
    </td>
  </tr>
  
  <tr>
    <td>
      praktikum.io Spaces
    </td>
    
    <td>
      <code>
        spaces.js
      </code>
    </td>
    
    <td>
      The single element named in <code>
        data-target
      </code>
    </td>
    
    <td>
      Google Maps, for address autocompletion; YouTube or Vimeo, only after the visitor clicks a video
    </td>
  </tr>
  
  <tr>
    <td>
      praktikum.io Organization Posting Embeds
    </td>
    
    <td>
      <code>
        organization-postings.js
      </code>
    </td>
    
    <td>
      The single element named in <code>
        data-target
      </code>
    </td>
    
    <td>
      Google Maps, for address autocompletion
    </td>
  </tr>
</tbody>
</table>

If you use praktikum.io Spaces or Organization Posting Embeds, the consent your visitors give should cover Google Maps as well, since it is loaded together with the embed.

## Revoking consent

praktikum.io Posting Embeds and Organization Posting Embeds do not set cookies or use browser storage, so there is nothing to clear when a visitor revokes consent. praktikum.io Spaces sets a single cookie, `stafftastic-video-consent`, when a visitor chooses to load a video. Remove it when consent is revoked.

An embed that has already been loaded cannot be unloaded. Reload the page after consent has been revoked, so the script is no longer included.

## Granting consent again

The script runs only once per page load. Adding it to the page a second time has no effect, so reload the page when a visitor grants consent again after revoking it.


## Sitemap

See the full [sitemap](http://localhost/sitemap.md) for all pages.
