Enable Google analytics
As an owner of the Code & Coffee Compendium site, I want real-time, quality information about visitors who visit the site.
Google Analytics is an industry standard analytics tool for website.
I believe we have a Google Analytics account for the main LearnTeachCode homepage -- thoughts on reusing it for this subsection of the site too? I'm not super familiar with GA anymore, they keep changing their UI and features lol... but it at least used to be easy to add more admins to an account and have different page sections.
@LearningNerd Sweet! In that case, I think that it would be best to hook into the existing account. It came up in our last meetup, and we thought it might be a good idea to get some insights into the folx who visit our site!
@LearningNerd @TristanDamron Do we know what gmail is linked to the existing google analytics account?
@LiesbethGijsel @TristanDamron Yup it's my personal email address. I just tried adding an updated code to the primary home page repo (https://github.com/LearnTeachCode/learnteachcode.github.io) because the old tracking code wasn't even working anymore. =P
Since I imagine our home page doesn't get much traffic, and it's the same domain name as the code coffee compendium, I think it makes sense to use the same tracking code / same "property" as Google calls it.
Here's the current tracking code -- add it to the <head> element on every page you want tracking info for:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118124010-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-118124010-1');
</script>
UPDATE: Confirmed this code is now working for the LTC homepage and registering new traffic. 🎉
Also, I'm happy to add a couple people to the Google Analytics account to view the dashboards, I just need your email addresses to give you access. Who else do you all think has been the most involved with creating this site and who'd be interested in being on the Google Analytics account? Let me know! :)
Hi @LearningNerd I'm interested to see the dashboards in Google Analytics. Feel free to add me to anything, my email is [email protected]. @TristanDamron I couldn't make it to the meeting yesterday because of a family emergency but hope to see the team next week
OK, I added you there @LiesbethGijsel you should receive an email invite. :)
Note: for this issue, someone still will need to add the tracking code to the Code Code Compendium to enable analytics on these pages. Currently we only have analytics on the LTC home page, which I wouldn't expect to get much traffic at all.