Jump to content

KIAE

Member
  • Posts

    2
  • Joined

  • Last visited

Reputation Activity

  1. Like
    KIAE reacted to Alisonsmith12 in Sample code for integrating Google's consent mode with Google Ads   
    <!-- Add this script to your HTML -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('consent', 'default', {
        ad_storage: 'denied', // Set default consent to deny ad storage
        analytics_storage: 'denied' // Set default consent to deny analytics storage
      });
      gtag('set', 'ads_data_redaction', true); // Enable ads data redaction
      gtag('js', new Date());
      gtag('config', 'GA_MEASUREMENT_ID');
    </script>

     
    Replace GA_MEASUREMENT_ID with your actual Google Analytics Measurement ID.
    This code sets the default consent for ad storage and analytics storage to denied and enables ads data redaction. It integrates with Google Ads by ensuring that ads data is not stored or used for users who have not provided consent.
  2. Like
    KIAE got a reaction from markjhonson in Sample code for integrating Google's consent mode with Google Ads   
    I have the same enquiry as Lisadoessegger, when using google tag manager what values must be changed? Thank you
  3. Like
    KIAE reacted to Lisadoessegger in Sample code for integrating Google's consent mode with Google Ads   
    Thank you for this example.
    I have added not only Google Ads but our entire Google Tag Manager using custom code, could you please also give an example code on how to integrate consent mode with that? Thanks!
  4. Like
    KIAE reacted to HMTppc in Sample code for integrating Google's consent mode with Google Ads   
    Do I have to update this code to be specific to my Tag Manager? Sorry if sounds like stupid question
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.