Update product analytics to use unprefixed Cube schemas
What does this MR do and why?
This MR changes the schemas being used from SnowplowTrackedEvents
and SnowplowSessions
to TrackedEvents
and Sessions
. This is a multiphase process to maintain reliability whilst we update the schema names.
Screenshots or screen recordings
No visual changes other than the axis dropping the Snowplow
prefix:
Before | After |
---|---|
/api/v4/projects/<PRODUCT_ID>/product_analytics/request/load
events should contain the updated schema names:
{
"queryType": "regularQuery",
"results": [
{
"query": {
"measures": [
"TrackedEvents.pageViewsCount"
],
"timeDimensions": [
{
"dimension": "TrackedEvents.derivedTstamp",
"granularity": "day"
}
],
...
},
...
},
...
],
...
How to set up and validate locally
- Follow these instructions to set up Product Analytics in GDK.
- Onboard
Product Analytics
by setting up the feature at Project > Analytics > Analytics dashboards. - View the dashboard listing at Project > Analytics > Analytics dashboards.
- Verify dashboards are shown in the listing.
- Select a dashboard.
- Verify the dashboard is shown with data and changing the date range changes the data shown.
You can also run an API query directly to validate the API endpoint returns valid data:
curl --location 'https://<HOST>/api/v4/projects/<PROJECT_ID>/product_analytics/request/load' \
--header 'Private-Token: <PAT_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"query": {
"measures": [
"TrackedEvents.pageViewsCount"
],
"timeDimensions": [
{
"dimension": "TrackedEvents.derivedTstamp",
"granularity": "day"
}
],
"filters": [
{
"operator": "equals",
"values": [
"page_view"
],
"member": "TrackedEvents.event"
},
{
"member": "TrackedEvents.derivedTstamp",
"operator": "inDateRange",
"values": [
"2023-09-11",
"2023-09-18"
]
}
],
"limit": 100,
"timezone": "UTC",
"dimensions": []
},
"queryType": "multi"
}'
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.
Related to #424895 (closed)
Edited by Robert Hunt