# Integrazione NUOVO script Iubenda via GTM

**URL:** <https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092>\
**Category:** General requests\
**Created:** [March 6, 2025, 8:23am UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092 "2025-03-06T08:23:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![francesco.lucioni](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@francesco.lucioni](https://support.iubenda.com/u/francesco.lucioni)\
**Post date:** [March 6, 2025, 8:23am UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092/1 "2025-03-06T08:23:27Z")

</div>

Con il nuovo script per l'integrazione della cookie solution (\<script type="text/javascript" src="//embeds.iubenda.com/widgets/xxx.js"\>\</script\>) non è più presente la parte di script che permetteva l'inserimento tramite template ufficiale GTM (\_iub.csConfiguration). L'unico modo per inserire il banner via GTM ora è tramite custom HTML, ma così facendo spesso si incorre in errori in console di questo tipo:  
  
[IUBCS|ERROR]: Google Tag Manager initialized before setting the default consent or before embedding the TCF stub.  
  
E disattivando l'automatic blocking da pannello iubenda, questo errore sparisce MA non vengono più erogati i comandi di gestione del consenso per la Google Consent Mode.

Come si può risolvere? è possibile fare un revert al vecchio codice di integrazione? è presente un nuovo template valido per il nuovo script?

* * *

_Importato da [support.iubenda.com](http://support.iubenda.com) (topic #42000309579) · 👍 6 upvote su Freshdesk · 👁 2072 visualizzazioni_

---

<div class="post-metadata">

**Author:** ![otticariccishop](https://avatars.discourse-cdn.com/v4/letter/o/ecc23a/32.png) [@otticariccishop](https://support.iubenda.com/u/otticariccishop)\
**Post date:** [March 28, 2025, 10:45am UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092/2 "2025-03-28T10:45:33Z")

</div>

Ciao, hai risolto?

Mi pare di aver capito di avere lo stesso errore

---

<div class="post-metadata">

**Author:** ![francesco.lucioni](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@francesco.lucioni](https://support.iubenda.com/u/francesco.lucioni)\
**Post date:** [April 3, 2025, 9:00am UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092/3 "2025-04-03T09:00:37Z")

</div>

Ciao, no purtroppo non sembra abbiano ancora aggiornato il template...

---

<div class="post-metadata">

**Author:** ![jallaik136](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jallaik136](https://support.iubenda.com/u/jallaik136)\
**Post date:** [April 7, 2025, 9:35am UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092/4 "2025-04-07T09:35:37Z")

</div>

Why is my Iubenda banner not showing up?"\>

&nbsp;

---

<div class="post-metadata">

**Author:** ![camyilmaz410](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@camyilmaz410](https://support.iubenda.com/u/camyilmaz410)\
**Post date:** [June 23, 2025, 6:46pm UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092/5 "2025-06-23T18:46:46Z")

</div>

I am also having a very similar problem with the new Iubenda script integration for the Cookie Solution.

With the introduction of the new snippet:

\<script type="text/javascript" src="//embeds.iubenda.com/widgets/xxx.js"\>\</script\>

the configuration via the official Google Tag Manager template based on \_iub.csConfiguration is no longer available.

The only alternative seems to be the insertion via custom HTML tag in GTM, but this frequently generates errors in the console like:

[IUBCS|ERROR]: Google Tag Manager initialized before setting the default consent or before embedding the TCF stub.

By disabling the automatic block from the Iubenda panel, the error disappears, but the activation of the commands for the Google Consent Mode is also interrupted, so it is not a real solution.

I would like to know:

Is it possible to revert the old integration system that used \_iub.csConfiguration?

Is there a new updated official template for GTM compatible with the new script?

What is the correct way to implement Google Consent Mode with the new approach?

The reference to the Iubenda documentation is this:

[https://www.iubenda.com/it/help/13323](https://www.iubenda.com/it/help/13323)&nbsp;&nbsp; &nbsp;[.](https://escortlar689.xyz/)[.](https://escortlar692.xyz/)[.](https://escortlar694.xyz/)[.](https://escortlar695.xyz/)[.](https://escortlar697.xyz/)[.](https://escortlar698.xyz/)[.](https://escortlar703.xyz/)[.](https://escortlar704.xyz/)[.](https://escortlar723.xyz/)[.](https://escortlar725.xyz/)[.](https://escortlar727.xyz/)[.](https://escortlar733.xyz/)[.](https://escortlar737.xyz/)[.](https://escortlar738.xyz/)[.](https://escortlar740.xyz/)[.](https://escortlar742.xyz/)[.](https://liecea.best/)[.](https://phthot.best/)[.](https://pisiff.best/)[.](https://czanch.best/)[.](https://huggre.best/)[.](https://wesoth.best/)[.](https://pyanci.best/)[.](https://cylled.best/)[.](https://bueerb.best/)[.](https://famene.best/)[.](https://taceni.best/)[.](https://jetion.best/)&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![saraleuzzi.work](https://yyz2.discourse-cdn.com/flex048/user_avatar/support.iubenda.com/saraleuzzi.work/32/19_2.png) [@saraleuzzi.work](https://support.iubenda.com/u/saraleuzzi.work)\
**Post date:** [July 21, 2025, 8:22am UTC](https://support.iubenda.com/t/integrazione-nuovo-script-iubenda-via-gtm/4092/6 "2025-07-21T08:22:08Z")

</div>

Salve.  
Io ho provato a integrare Iubenda via GTM attraverso il modello provvisto da Iubenda. Qui, ho selezionato "extended snippet" e ho incollato la parte di snipper del banner compreso tra le parentesi graffe, escludendo il punto e virgola. Ti mostor di seguito cosa va inserito:  
{"siteId":numerodelsitoweb,"cookiePolicyId":numerodellapolicy,"lang":"en","storage":{"useSiteId":true}}  
  
Come trigger, avevo selezionato "Consent inizialization".&nbsp;  
Se non trovi questa stringa di codice all'interno del codice del cookie banner, prova a eliminare completamente il cookie banner cliccando su "elimina" sotto la voce Privacy Controls e Cookie Solution nella tua dashboard (sotto "integra", per chiarirmi) e crealo da capo. In questo modo dovrebbe generare questo codice.   
  
Se vuoi procedere in ogni modo con GTM, fallo. Funziona, però non ti assicuro che raggiungerai una configurazione ottimale dal punto di vista dei consensi, tag, ecc. Infatti, per questo motivo e&nbsp;anche in virtù della Consent Mode, ho deciso di integrare il cookie banner nell'head del sito web. In questo modo, esso viene caricato molto più velocemente rispetto a prima.&nbsp;  
  
Spero di esser stata d'aiuto.&nbsp;
