grantButton.addEventListener("click", function() { localStorage.setItem("consentGranted", "true"); function gtag() { dataLayer.push(arguments); } gtag('consent', 'update', { ad_user_data: 'granted', ad_personalization: 'granted', ad_storage: 'granted', analytics_storage: 'granted' }); // Load gtag.js script. var gtagScript = document.createElement('script'); gtagScript.async = true; gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-9927RFZXGZ'; var firstScript = document.getElementsByTagName('script')[0]; firstScript.parentNode.insertBefore(gtagScript,firstScript); POST /IndexNow HTTP/1.1Content-Type: application/json; charset=utf-8Host: api.indexnow.org{ "host": "www.example.org", "key": "8dfb519f0c8f422cbe040d9f92520e2e", "keyLocation": "https://www.example.org/8dfb519f0c8f422cbe040d9f92520e2e.txt", "urlList": [ "https://www.example.org/url1", "https://www.example.org/folder/url2", "https://www.example.org/url3" ]}