Add link clicks count to schema
What does this MR do and why?
This MR adds the ability for us to query for data provided by the Link Click Tracking browser SDK plugin.
This results in the visualization designer being able to create visualizations for link click events. The existing click events measure hasn't worked since the Jitsu → Snowplow switchover.
Screenshots or screen recordings
How to set up and validate locally
Setting up
- Pull this branch and restart your local Cube docker container.
- Generate some link click events (you can use the browser SDK to do this).
Testing Cube playground
- Visit your Cube playground: http://localhost:4000/
- Run the query:
{
"measures": [
"TrackedEvents.linkClicksCount"
],
"dimensions": [
"TrackedEvents.targetUrl",
"TrackedEvents.elementId"
],
"filters": [
{
"member": "TrackedEvents.eventName",
"operator": "equals",
"values": [
"link_click"
]
}
],
"limit": 100,
"timezone": "UTC",
"timeDimensions": []
}
- Validate that it returns the expected data. See gitlab-org/gitlab#414896 (comment 1583485099) as to why we have to add a filter to the query.
(Bonus) Test GitLab repo
- Use the branch from Fix "Click Events" measure has it has no corres... (gitlab-org/gitlab!133108 - merged).
- Make sure your local GitLab repo is running with a GitLab Ultimate licence.
- Follow these instructions to set up Product Analytics in your GDK.
- Visit the visualization designer, e.g.
http://gdk.test:3000/gitlab-org/gitlab-test/-/analytics/dashboards/visualization-designer
. - Select the “Link Click Events” → “All Click Events” measure.
- Confirm a visualization appears and that you can select the drill-down dimensions “Target ID” and “Element ID”.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Robert Hunt