Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Analytics completely gone? #787

Closed
chalin opened this issue Nov 5, 2022 · 8 comments
Closed

Google Analytics completely gone? #787

chalin opened this issue Nov 5, 2022 · 8 comments
Assignees

Comments

@chalin
Copy link
Contributor

chalin commented Nov 5, 2022

Hi, I'm working on migrating CNCF projects from UA to GA4. It seems that GA was replaced in favor of FA via:

But the GA ID still appears in the config.toml file

google_analytics_id = "UA-111730698-1"

Which I figured could have been an omission, but the GA ID also still appears in nats.io page HTML. Is this because FA uses the same site ID, or is the ID used for another purpose?

If GA is completely gone, can you grant the CNCF access to your FA account?

/cc @nate-double-u @caniszczyk

@gcolliso
Copy link
Member

gcolliso commented Nov 7, 2022

@chalin we have moved off of GA to FA. If any reference exists it's just an error in removing all references to GA. What access to Fathom are you looking to have?

@chalin
Copy link
Contributor Author

chalin commented Nov 7, 2022

any reference exists it's just an error in removing all references to GA

👍

What access to Fathom are you looking to have?

Basic read access to analytics data.

@gcolliso
Copy link
Member

@chalin I can give you access to the shared link but would rather not publish here. Could you email me? Ginger at nats.io

@chalin
Copy link
Contributor Author

chalin commented Nov 10, 2022

Thanks, an email is on its way.

Shall I leave this open as a reminder to clean out the config.toml file?

@gcolliso
Copy link
Member

Sure, thanks!

@chalin
Copy link
Contributor Author

chalin commented Nov 11, 2022

FYI, if you look at the HTML of any site page you'll see

<script>
function getGAKey(){return "UA-111730698-1";}
function getGAKeyDisableKey(){return "ga-disable-"+getGAKey();}
function getCookie(){var cookies=document.cookie;var a=cookies.split(";");return a.find(function(e){e=e.trim();return e.startsWith("ga-disable=");});}
function updateCheckbox(tc){var checked=false;if(tc){checked=tc.trim().split('=')[1]=="true";}
$('#disable_analytics').prop('checked',checked);return checked;}
function addGA(){if(!$('#gascript').length){var s=document.createElement('script',{async:'',id:'gascript'});s.type='text/javascript';s.src='https://www.google-analytics.com/analytics.js';$('body').append(s);}}
function checkTrack(){var tc=getCookie();var disable=updateCheckbox(tc);window[getGAKeyDisableKey()]=disable;if(!tc){openPrivacy(tc);}else{addGA();}}
function openPrivacy(tc){var gdprSel=$('#gdpr');gdprSel.removeClass('hide');return handleSizes();}
var paddingTop=0;function handleSizes(){var gdprSel=$('#gdpr');if(!gdprSel.hasClass('hide')){var h=gdprSel.innerHeight();var body=$('body');var pt=parseInt(body.css('padding-top'),10);if(paddingTop===0){paddingTop=pt;}
body.css("padding-top",(paddingTop+h)+"px");$('#nav').css({top:h+"px"});gdprSel.css({top:0,position:"fixed",zIndex:2000,width:"100%"});}}
$(window).resize(handleSizes);$(window).load(function(){var sel=$('#disable_analytics');if(sel.length){sel.change(function(){deleteCookie("ga-disable");if($(this).is(':checked')){disableAnalytics();}else{enableAnalytics();}
return false;});};});function disableAnalytics(){window[getGAKeyDisableKey()]=true;closeRibbon();var d=new Date();d.setFullYear(d.getFullYear()+1);document.cookie="ga-disable=true; expires="+oneYearFromNow().toUTCString()+"; path=/";addGA();}
function enableAnalytics(){window[getGAKeyDisableKey()]=false;closeRibbon();var d=new Date();d.setFullYear(d.getFullYear()+1);document.cookie="ga-disable=false; expires="+oneYearFromNow().toUTCString()+"; path=/";addGA();}
function oneYearFromNow(){var d=new Date();d.setFullYear(d.getFullYear()+1);return d;}
function closeRibbon(){var gdprSel=$('#gdpr');if(!gdprSel.hasClass('hide')){$('#nav').css({top:"0px"});gdprSel.addClass('hide');if(paddingTop){$('body').css("padding-top",paddingTop+"px");}
if(getCookie()===undefined){enableAnalytics();}}}
function deleteCookie(name){document.cookie=name+'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';}</script><script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;ga('create',getGAKey(),{cookieExpires:0});ga('set','anonymizeIp',true);ga('send','pageview');
</script>

So it seems that GA code is still being generated.

@gcolliso gcolliso mentioned this issue Dec 6, 2022
@gcolliso gcolliso closed this as completed Dec 6, 2022
@gcolliso
Copy link
Member

@chalin I think we may be going back to GA at the end of this month for the nats.io site. Do you know if there is still a requirement to have a cookies/GDPR/Privacy banner for the new GA4? We appreciate Fathom for that reason.

@chalin
Copy link
Contributor Author

chalin commented Feb 24, 2023

Hi @gcolliso. At the moment, the banner/popup guidance I've been given (and will hopefully be working on soon) is along the lines of the popup shown on the cncf.io site, which reads like:

This website stores data such as cookies to enable essential site functionality, as well as marketing, personalization, and analytics. By remaining on this website you indicate your consent. Cookie Policy

I hope that this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants