niallkp opened a new issue, #37095:
URL: https://github.com/apache/shardingsphere/issues/37095

   Hi ShardingSphere Team!
   
   We appreciate you actioning Issue #34415 back in January to remove **Baidu & 
Google analytics** from your website. However there are still 20,000+ pages in 
your old docs which still contain these analytics.
   
   ### Pages Which Use googletagmanager.com & hm.baidu.com
   I have managed to remove almost all the references to 
**_googletagmanager.com & hm.baidu.com_** using the following find/replace 
commands and will submit a PR shortly
   
   `find . -type f -name '*.html' -exec sed -z "s/\n    <script>\n      var 
_hmt = _hmt || \[\];\n      (function() {\n        var hm = 
document.createElement(\"script\");\n        hm.src = 
\"https:\/\/hm.baidu.com\/hm.js?d5a1dc8dcf63a64ee55b80de01c7fb1a\";\n        
var s = document.getElementsByTagName(\"script\")\[0\]; \n        
s.parentNode.insertBefore(hm, s);\n      \})();   \n    <\/script>\n    /\n/" 
-i {} \;
   `
   
   `find . -type f -name '*.html' -exec sed -z "s/\n    <script async 
src=\"https:\/\/www.googletagmanager.com\/gtag\/js?id=G-HETCF66YL0\"><\/script>\n
    <script>\n      window.dataLayer = window.dataLayer || \[\];\n      
function gtag(){window.dataLayer.push(arguments);}\n      gtag('js', new 
Date());\n\n      gtag('config', 'G-HETCF66YL0');\n    <\/script>\n\n/\n/" -i 
{} \;`
   
   The above commands worked for all but the following five pages which I 
manually edited to remove
   - 
[index.html](https://github.com/apache/shardingsphere-doc/blob/asf-site/index.html)
   - 
[index_zh.html](https://github.com/apache/shardingsphere-doc/blob/asf-site/index_zh.html)
   - 
[learning.html](https://github.com/apache/shardingsphere-doc/blob/asf-site/learning.html)
   - 
[legacy.html](https://github.com/apache/shardingsphere-doc/blob/asf-site/legacy.html)
   - 
[legacy_zh.html](https://github.com/apache/shardingsphere-doc/blob/asf-site/legacy_zh.html)
   
   ### Rat Report with google-analytics.com Reference
   There is also a reference to **_google-analytics.com_** in the 
[rat-report.html](https://github.com/apache/shardingsphere-doc/blob/asf-site/statistics/staging/rat-report.html)
 which causes Shardingsphere to appear on a monthly report to the Privacy 
Committee and I will look at how that can be removed to avoid us getting a 
false positive
   
   ### Privacy Policy
   The ASF Privacy Policy does not permit the use of Google or Baidu Analytics 
on any ASF websites and the ASF Infra team enforce a Content Security 
Policy(CSP) that blocks access to external trackers:
   
   - https://infra.apache.org/csp.html
   - https://privacy.apache.org/policies/website-policy.html
   - https://privacy.apache.org/faq/committers.html#can-i-use-google-analytics
   
   Thanks
   
   Niall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to