Metadata
- Source
- SJRK-367
- Type
- Task
- Priority
- Major
- Status
- Open
- Resolution
- N/A
- Assignee
- Giovanni Tirloni
- Reporter
- Justin Obara
- Created
2020-06-23T14:55:25.508-0400 - Updated
2020-06-26T14:15:34.337-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Storytelling Tool UI
Description
Now that we have a Matomo set up, we should add the analytics/metrics tracking to the Story Telling tool. The purpose is to improve the tool and understand which browsers and devices to support.
The most important site at the moment is the AIHEC one, as it is in active use. However, something to consider is if all of the story telling sites should share a analytics or if they should be registered individually.
Comments
-
Giovanni Tirloni commented
2020-06-26T12:43:47.532-0400 There isn't a per-theme (or, ideally, per-deployment/domain) way to add the Matomo analytics code to the SJRK Story Telling tool.
We'd have to add a single analytics code to the base theme, but that wouldn't allow us to know which instances are not being actively used anymore.
The alternative is to do some refactoring of the code so that each deployment has its own <head> template where the analytics code could be added.
@@Cindy Li @@Gregor Moss thoughts?
-
Cindy Li commented
2020-06-26T13:29:22.260-0400 I agree each deployment/domain should have its own analytics code.
Each domain has its own theme folder in the master branch. "/template" is one subfolder holding custom templates for this theme. I think the analytics code for a domain can be placed in its theme folder for it to be pulled in by the base template in the base theme.
@@Gregor Moss, what do you think?
-
Gregor Moss commented
2020-06-26T14:15:34.337-0400 I also agree that it would be ideal if each deployment had its own analytics (including separating the FLOE-themed staging site from the FLOE-themed production site).
We can add a templated element to each HTML page (it doesn't need to be in the head tag, though that's certainly a possibility) that is filled in dynamically in much the same way the various UI components of each page grade are defined and overridden by theme. This could be achieved with a single template file in the base theme's "templates" directory, and then provide only the part that differs from site to site at creation/render time (which I guess is the part defined as {$IDSITE} in this sample code: https://developer.matomo.org/guides/tracking-javascript-guide).