Embedded Deployment
You have the option to deploy DataGrail Consent to your website as an embedded script, either alongside our Google Tag Manager (GTM) deployment method, or without it. You may want to use an embedded deployment to load DataGrail Consent on your site for the following scenarios:
- Site optimization: With an embedded script, you have more control over the loading order of DataGrail Consent. This is useful if you are running optimization software for A/B testing or other purposes.
- Circumventing web browser blockers: Some browsers block
googletagmanager.com
from loading on your website, which may preemptively block DataGrail Consent. Embedded deployment will allow DataGrail to independently load DataGrail Consent on your website, instead of via GTM.
Each container has its own unique script tag, which looks like this:
<!-- DataGrail Consent Script -->
<script
type="text/javascript"
src="https://api.consentjs.datagrail.io/[CUSTOMER_ID]/[CONTAINER_ID]/consent-loader.js"
></script>
<!-- End DataGrail Consent Script -->
Place this script at the first element of the <head>
on each page of your website, which we recommend doing before toggling the embedded deployment option and republishing the banner. This will ensure changes take effect with zero downtime.
We strongly recommend deploying through Google Tag Manager (GTM), as this approach allows tags to be automatically managed and updated without developer intervention. With the Embedded approach, new cookies and scripts require developer resources to create and publish rules each time new items are identified.
Implementation
DataGrail Consent can be deployed in embedded/static script mode with or without Google Tag Manager. The embedded script can work alongside Google Tag Manager to allow for tag classification while still deploying a static script.
Embedded Deployment without Google Tag Manager
- Navigate to the Consent Management tab, select Settings, and then Containers.
- Select Add a Container and then DataGrail Container from the dropdown.
- Name and create the container.
- Open the newly created container and select Copy Script.
- Place this script at the first element of the
<head>
of your website, which we recommend doing before toggling the embedded deployment option and republishing the banner. This will ensure changes take effect with zero downtime.
Embedded Deployment with Google Tag Manager
After you have connected DataGrail to Google Tag Manager, you will see the option to enable embedded deployment for each container within the Containers section of the Consent Management Settings page.
Enabling embedded deployment will alter the publish process to power the banner notice only via the embedded script added to your site, rather than through Google Tag Manager. Although embedded deployment will remove the script from being deployed via Google Tag Manager, we will still manage services and scripts within Google Tag Manager. The key difference in embedded deployment is control of the loading for the consent banner is moved directly into the page.
Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.