Title: script blocking field
Last modified: June 13, 2018

---

# script blocking field

 *  Resolved [Ambyomoron](https://wordpress.org/support/users/josiah-s-carberry/)
 * (@josiah-s-carberry)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/)
 * Could someone please share examples of what you put in the script blocking field?
   Thanks!

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

 *  [fermanus](https://wordpress.org/support/users/fermanus/)
 * (@fermanus)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10395858)
 * For example something like this (for google analytics)
 * <script>
    (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){(
   i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,
   m) })(window,document,’script’,’[https://www.google-analytics.com/analytics.js&#8217](https://www.google-analytics.com/analytics.js&#8217);,’
   ga’);
 * ga(‘create’, ‘UA-XXXXX-Y’, ‘auto’);
    ga(‘send’, ‘pageview’); </script>
 *  Thread Starter [Ambyomoron](https://wordpress.org/support/users/josiah-s-carberry/)
 * (@josiah-s-carberry)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10396064)
 * Thank you, fermanus. Are you saying that the purpose of this field is just to
   allow you to run any script on your site’s pages?
 * Isn’t it true that the script you indicate creates a tracking cookie with the
   tracking ID indicated and sends the fact of a page view to Google? Why would 
   I put such a script in a plugin that is fundamentally to allow visitors to NOT
   have cookies saved on their devices and not be tracked if they don’t want to 
   be tracked???
 * I apologize for this very basic question, but there is something fundamental 
   about the plugin that I have not capture, and the available plugin documentation
   is quite useless in that regard.
 *  [LogoLogics](https://wordpress.org/support/users/logologics/)
 * (@logologics)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10396097)
 * Hi Josiah,
 * The blocking field in this plugin is only so you can put the scripts ( like Google
   Analytics, Facebook pixels, conversion codes etc ) in there, so they are blocked
   and will stay blocked until a user hits the “accept/ok” button.
 * You need to remove those scripts from where they where added before ( like using
   a plugin as Monsterinsights or manually added ). Those scripts now can only reside
   in the blocking feature, so they will only work if and until the ok button is
   hit.
 * Hope this helps?
    Annie
    -  This reply was modified 7 years, 12 months ago by [LogoLogics](https://wordpress.org/support/users/logologics/).
 *  Thread Starter [Ambyomoron](https://wordpress.org/support/users/josiah-s-carberry/)
 * (@josiah-s-carberry)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10396151)
 * That makes perfect sense, Annie, and I thank you for the first clear explanation
   of how this plugin is supposed to work.
    Just to make sure I have understood 
   correctly, if: – I make sure that there is no other script to set a Google Analytics
   cookie; and – I enter that script in the script blocking field; and either – 
   A visitor to the site does not click on the button to accept cookies; or – A 
   visitor first clicks on the button to accept cookies and then later clicks on
   the Refuse Cookies button; then – That script in the Script Blocking field will
   NOT be executed; otherwise – That script WILL be executed
 * Is that correct?
 *  [fermanus](https://wordpress.org/support/users/fermanus/)
 * (@fermanus)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10396725)
 * I think it works as follows:
 * 1 is correct (the GA script should only be in the script blocking field).
    2 
   If the visitor does not click anything the notice bar will not disappear and 
   the script(s) won’t be executed. If he (she) clicks on the “refuse” button the
   script(s) won’t be executed but the notice bar will disappear. 3. If he clicks“
   accept”, the script will be executed and the notice bar disappears. If he decides
   that after all he does not want to be tracked he needs access to the notice bar.
   First click the “revoke” button. The notice bar pops-up and a new choice can 
   be made. Of course this way one can also change from “refuse” to “accept”.
 *  Thread Starter [Ambyomoron](https://wordpress.org/support/users/josiah-s-carberry/)
 * (@josiah-s-carberry)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10396746)
 * I think we’re on the same page. Thanks very much.
 *  [LogoLogics](https://wordpress.org/support/users/logologics/)
 * (@logologics)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10397377)
 * Hi Josiah,
 * You´re welcome!
    Annie

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

The topic ‘script blocking field’ is closed to new replies.

 * ![](https://ps.w.org/cookie-notice/assets/icon-256x256.png?rev=3549327)
 * [Compliance by Hu-manity.co](https://wordpress.org/plugins/cookie-notice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [LogoLogics](https://wordpress.org/support/users/logologics/)
 * Last activity: [7 years, 12 months ago](https://wordpress.org/support/topic/script-blocking-field/#post-10397377)
 * Status: resolved