Title: Script
Last modified: May 20, 2018

---

# Script

 *  Resolved [bohesz](https://wordpress.org/support/users/bohesz/)
 * (@bohesz)
 * [8 years ago](https://wordpress.org/support/topic/script-4/)
 * Hello. I do not quite understand how I should complete the “Third Party Cookies”
   section. What code should I place in the column “The below script will be added
   right after the BODY section if user allows this cookie.” Could you publish one
   example? Well thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fscript-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [MA](https://wordpress.org/support/users/gasparnemes/)
 * (@gasparnemes)
 * [8 years ago](https://wordpress.org/support/topic/script-4/#post-10360284)
 * Hi There,
 * Thanks for your comments. You can setup the plugin in the CMS -> Settings -> 
   GDPR Cookie. In the general settings, you can setup the branding, and other elements.
   To add the Google Analytics, you can enable the “3rd Party Cookies” tab but selecting
   the “Turn” radio value to “ON”. At the bottom of the “3rd Party Cookies” tab 
   you’ll find 3 sections to add scripts. First will be added to the <head> section
   before the <body> tag, the middle one will be added after the <body> tag and 
   the last on before the </body> closing tag (footer).
    You can get your Tracking
   code from your Google Analytics account, read more about how to get the tracking
   code: [https://support.google.com/analytics/answer/1008080?hl=en](https://support.google.com/analytics/answer/1008080?hl=en)
 * You you’ll get a script like this, where the GA_TRACKING_ID is your property 
   ID:
 *     ```
       <!-- Global Site Tag (gtag.js) - Google Analytics -->
       <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
       <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
   
         gtag('config', 'GA_TRACKING_ID');
       </script>
       ```
   
 * Once you have the script with the replaced GA_TRACKING_ID, you can add it to 
   the first script section which will be added to the <head> section of your website.
   The field name is: **The below script will be added to the page HEAD section 
   if user enables this cookie.**
 * Save the options, and test the implementation.
 * Related to the “The below script will be added right after the BODY section if
   user allows this cookie.”, if you Implement a Google Tag Manager script (not 
   the general Google Analytics), the tracking code has two main parts, one should
   be added to the <head> section and another one right after the <body> tag. That’s
   why our plugin has 3 options for this.
 * I hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘Script’ is closed to new replies.

 * ![](https://ps.w.org/gdpr-cookie-compliance/assets/icon-256x256.png?rev=2376316)
 * [GDPR Cookie Compliance - Cookie Banner, Cookie Consent, Cookie Notice for CCPA, EU Cookie Law](https://wordpress.org/plugins/gdpr-cookie-compliance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gdpr-cookie-compliance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gdpr-cookie-compliance/)
 * [Active Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [MA](https://wordpress.org/support/users/gasparnemes/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/script-4/#post-10360284)
 * Status: resolved