openshift-homeroom / workshop-dashboard

Adds content hosting to workshop terminals.
Apache License 2.0
47 stars 37 forks source link

Work out how can use a single Google analytics code. #43

Open GrahamDumpleton opened 5 years ago

GrahamDumpleton commented 5 years ago

Currently using multiple Google analytics code, one for each workshop. Work out a way of using events/labels to apply workshop name to analytics data and use one Google analytics code. So data will be all aggregated, but can then pull out reports on specific workshop.

GrahamDumpleton commented 5 years ago

@jankleinert

GrahamDumpleton commented 5 years ago

Currently using:

const google_analytics = `
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-135921114-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag("js", new Date());
  gtag("config", "UA-XXXX-1");
</script>
`;

Things likely want to track are:

For DEPLOYMENT_TYPE can have spawner, personal and maybe katacoda.

For CONFIGURATION_TYPE, if using spawner, have learning-portal, hosted-workshop etc. If using personal, have none, or cluster-admin.

Other things that might be able to be tracked are SERVER_LIMIT for some of the spawner configuration types.

GrahamDumpleton commented 5 years ago

Relevant docs.