Title: GDPR Block script until consent?
Last modified: May 27, 2018

---

# GDPR Block script until consent?

 *  [LogoLogics](https://wordpress.org/support/users/logologics/)
 * (@logologics)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/)
 * Hi,
 * Is there a way to block the scripts entered in tracking code manager, until a
   user gives consent under the GDPR please?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgdpr-block-script-until-consent%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [carlosmdh](https://wordpress.org/support/users/carlosmdh/)
 * (@carlosmdh)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10330377)
 * Hi [@logologics](https://wordpress.org/support/users/logologics/)
 * There is one to block analytics code tracking via Google Tag Manager
 * [https://carlosmdh.es/tutoriales/adaptar-la-ley-de-cookies-al-rgpd/](https://carlosmdh.es/tutoriales/adaptar-la-ley-de-cookies-al-rgpd/)
 * Mesagge & aaccept or reject are in spanish. Yo can change these in Google Tag
   Manager Variables, and you must change policy url in cookiepermssion – ask (line
   77).
    You must change Google Analytics triggers from “Al pages” to “Cookiepermision-
   firstpage YES” and “Cookiepermission YES”
 * json to import to Google Tag Manager are here:
 * [https://github.com/carlosmdh/Cookie-Consent](https://github.com/carlosmdh/Cookie-Consent)
 *  [carlosmdh](https://wordpress.org/support/users/carlosmdh/)
 * (@carlosmdh)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10330393)
 * To Add Google Tag Manager into WordPress, There is the procedure:
 * [https://carlosmdh.es/tutoriales/como-anadir-el-codigo-de-google-tag-manager-a-wordpress/](https://carlosmdh.es/tutoriales/como-anadir-el-codigo-de-google-tag-manager-a-wordpress/)
 * To add Google Analytics vía Google Tag Manager to WordPress, see here:
 * [https://carlosmdh.es/tutoriales/como-anadir-la-etiqueta-de-google-analytics-a-wordpress/](https://carlosmdh.es/tutoriales/como-anadir-la-etiqueta-de-google-analytics-a-wordpress/)
 *  Plugin Contributor [intellywp](https://wordpress.org/support/users/intellywp/)
 * (@intellywp)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10336167)
 * Hi [@logologics](https://wordpress.org/support/users/logologics/),
    Thanks for
   choosing IntellyWP products.
 * Unfortunately this feature is not available on our plugin.
 * You could install a free plugin like
 * [https://wordpress.org/plugins/gdpr/](https://wordpress.org/plugins/gdpr/)
 * configure the Analytics script following their documentation, then add the final
   code from the option panel of our plugin.
 * Let me know if you have any additional questions and will be a pleasure to help
   you.
 * Cheers
 * IntellyWP
 *  Thread Starter [LogoLogics](https://wordpress.org/support/users/logologics/)
 * (@logologics)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10336696)
 * Hi,
 * Thanks for all the answers.
 * I have the “Cookie Notice” plugin by dfactory and it works well with Facebook
   pixels, Google Analytics, thank you conversion code. Except when I ad the retargeting
   code ( wich works great when in Google remarketing plugin ” it does not function/
   fire anymore.
 * Only this code also did not work when in your plugin by the way, I only got it
   tor work with the Google remarketing plugin. But now I need to find a way to 
   block the script until concent. Arggg GDPR hahaha
 * Thanks,
    Annie
 *  [carlosmdh](https://wordpress.org/support/users/carlosmdh/)
 * (@carlosmdh)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10336887)
 * [@logologics](https://wordpress.org/support/users/logologics/).
 * GTM implementations works with all codes that you ads like GTM labels. no additional
   plugin is necessary
 * Greats
 *  Thread Starter [LogoLogics](https://wordpress.org/support/users/logologics/)
 * (@logologics)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10338220)
 * Hi Carlos,
 * I know it should, but I always got errors ( only with the Remarketing tag ) if
   I add it to this plugin or now in the Cookie notice plugin.
 * I do not know why, just can say it works like a charme as soon as I add it to
   the Google remarketing plugin.
 * Unfortunately, now with the GDPR I need an option to block it until consent is
   given and the Google remarketing plugin does not do that so far.
 * Any idea why I got these errors?
 *  Plugin Contributor [intellywp](https://wordpress.org/support/users/intellywp/)
 * (@intellywp)
 * [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10371483)
 * Hi Annie,
    we are sorry for the delay.
 * If you’ve installed “Cookie Notice” plugin by dfactory, you could create a new
   slot from our plugin using the following script:
 *     ```
       <script>
   
       var cookieStatus = 'false';
       var value = "; " + document.cookie,
       parts = value.split( '; cookie_notice_accepted=' );
   
       if ( parts.length === 2 ) {
           var cookieStatus = parts.pop().split( ';' ).shift();
       }
   
       if ( cookieStatus == 'true' ) {
           /* YOUR SCRIPT HERE*/
       }
   
       </script>
       ```
   
 * then replace /* YOUR SCRIPT HERE*/ with your script.
 * Let me know if you have any additional questions and will be a pleasure to help
   you.
 * Cheers
 * IntellyWP

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘GDPR Block script until consent?’ is closed to new replies.

 * ![](https://ps.w.org/tracking-code-manager/assets/icon-256x256.jpg?rev=2749278)
 * [Tracking Code Manager](https://wordpress.org/plugins/tracking-code-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tracking-code-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tracking-code-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/tracking-code-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tracking-code-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tracking-code-manager/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [intellywp](https://wordpress.org/support/users/intellywp/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/gdpr-block-script-until-consent/#post-10371483)
 * Status: not resolved