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

Enable Google analytics #104

Open
TristanDamron opened this issue Sep 6, 2021 · 6 comments
Open

Enable Google analytics #104

TristanDamron opened this issue Sep 6, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@TristanDamron
Copy link
Collaborator

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.

@TristanDamron TristanDamron added enhancement New feature or request good first issue Good for newcomers labels Sep 6, 2021
@LearningNerd
Copy link
Member

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.

@TristanDamron
Copy link
Collaborator Author

@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!

@LiesbethGijsel
Copy link
Collaborator

@LearningNerd @TristanDamron Do we know what gmail is linked to the existing google analytics account?

@LearningNerd
Copy link
Member

LearningNerd commented Sep 11, 2021

@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! :)

@LiesbethGijsel
Copy link
Collaborator

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

@LearningNerd
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants