Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

As an admin I can add a Google Analytics ID #171

Closed
QuincyLarson opened this issue Nov 15, 2019 · 10 comments
Closed

As an admin I can add a Google Analytics ID #171

QuincyLarson opened this issue Nov 15, 2019 · 10 comments
Labels
Admin Roadmap This is an issue/feature that is on the road map for the future

Comments

@QuincyLarson
Copy link
Contributor

No description provided.

@QuincyLarson QuincyLarson added MVP Wontfix This will not be worked on Admin and removed Wontfix This will not be worked on labels Nov 15, 2019
@allella
Copy link
Contributor

allella commented Nov 15, 2019

#44 holds some of the earlier conversation.

@vkWeb vkWeb added the Help Wanted Extra attention is needed label Nov 16, 2019
@QuincyLarson QuincyLarson changed the title As an admin I can add a Google Analytics ID API: As an admin I can add a Google Analytics ID Nov 30, 2019
@QuincyLarson QuincyLarson removed the Help Wanted Extra attention is needed label Nov 30, 2019
@QuincyLarson QuincyLarson changed the title API: As an admin I can add a Google Analytics ID As an admin I can add a Google Analytics ID Feb 11, 2020
@Zeko369
Copy link
Member

Zeko369 commented Feb 20, 2020

Will this be done per chapter or per instance?

@allella
Copy link
Contributor

allella commented Feb 20, 2020

It seems this would depend on the organization. For the MVP we may have talked about just 1 at the organization level.

For post-MVP, perhaps both, where the organization can track stats on every page and an individual chapter can provide their own code to track only their own internal pages.

On #44 we talked about the ability to drop in a Javascript snippet. Of course, there may be some security issues with that approach, so limiting the tracking to specific services and allowing people to drop in just their account ID at the organization or chapter levels might be the way to start.

@QuincyLarson
Copy link
Contributor Author

I agree we should just do this at the organization level. The organizer can always manually add other people in Google Analytics if they need to.

@Zeko369
Copy link
Member

Zeko369 commented Feb 23, 2020

To continue the note from the meeting where we said that the easiest way for people to setup the email credentials would be to just have them as a .env var.

Since the MVP will mainly be hosted on Heroku it's dead simple to set them up in Heroku, so maybe we could just have a GOOGLE_ANALYTICS_ID as an env variable so that could make things simpler for now

This will not only make it easier for us to develop (no need to add any code on the backend whatsoever), but also make it easier for people setting it up, because they could add Email credentials, google auth credentials and google analytics id in one place

@allella
Copy link
Contributor

allella commented Feb 23, 2020

Sounds good.

Since we're talking about post-MVP allowing for individual Chapters to track their own internal pages would we want to qualify this env variable a bit, like GOOGLE_ANALYTICS_ID_ORG ?

@Zeko369
Copy link
Member

Zeko369 commented Feb 23, 2020

We could do something like

const id = process.env[`GOOGLE_ANALYTICS_ID_${CHAPTER_ID}`] || process.env.GOOGLE_ANALYTICS_ID;

if(id) {
  render GA(id);
} 

@allella
Copy link
Contributor

allella commented Feb 23, 2020

I think when we get to the point of having chapter-specific tracking that we'd want to execute both codes. The organization will likely still want to see the overall stats, while the chapter would possibly have their own Analytics account that's independent of the organizations?

So, that snippet is a reasonable example, but we can figure the right way to execute / track the interior pages against two Analytics accounts when the time comes.

Thanks

@Zeko369
Copy link
Member

Zeko369 commented Feb 23, 2020

Yeah we can also do that. Also if we're doing that we can add chapter admins ability to do that from the dashboard (we can easily add that to the DB).
I just think that it would be a lot easier for people setting it up to just throw everything at Heroku and have everything work from there, and not have to fiddle around our UI.

But there could be some limitations with multiple codes on one page

@QuincyLarson
Copy link
Contributor Author

For our MVP, we should just use a single Google Analytics account for the entire instance, and add it as an environment variable in Heroku. We can leave this as a blank default environment variable in Heroku so people remember to configure it.

@moT01 moT01 added Roadmap This is an issue/feature that is on the road map for the future and removed MVP labels May 13, 2022
@allella allella closed this as completed May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Admin Roadmap This is an issue/feature that is on the road map for the future
Projects
None yet
Development

No branches or pull requests

5 participants