Skip to content

Fix Total Events visualization showing incorrect page views count value

What does this MR do and why?

Updates two one visualizations in the Snowplow behaviour dashboard which were incorrect.

  1. total_events.yaml

This visualization was actually pointing at SnowplowTrackedEvents.pageViewsCount, instead of just SnowplowTrackedEvents.count like the jitsu counterpart. This means it was showing incorrect data (panel title suggests "total events" but data is actually "total pageviews", which are almost certainly different things if the application is instrumented to send any custom /non-pageview events). I have swapped it to SnowplowTrackedEvents.count, which has just been added to the schema in gitlab-org/analytics-section/product-analytics/devkit!60 (merged)

2) **total_pageviews.yaml** (Resolved with !122447 (merged))

EDIT: I realised after digging into this, it is the same issue tracked here: #413630 (closed) I have removed my changes here now that other MR is merged.

This visualization points at pageViewsCount and applies a filter for event type - filtering on eventType, which does not seem to exist with snowplow (event or event_name columns contain the value), and was filtering for pageview, however in snowplow the value seems to be page_view. I have removed the filter from the visualization completely, as in the snowplow schema, pageViewsCount is already filtering correctly:

    pageViewsCount: {
      type: `count`,
      filters: [
        { sql: `${CUBE}.event = 'page_view'` }
      ]
    },

With these two issues fixed up, CubeJS is returning data in an expected format, which causes the Single Stat empty state to render correctly. I believe this empty panel bug that was noticed would be fixed by per-panel error handling: Validation and error handling for dashboard vis... (#396228 - closed)

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Wait for Update individual dashboards to retrieve dashbo... (!121129 - merged) MR to be merged, as this one does not run without those changes.
  2. Follow these instructions to set up Product Analytics in your GDK.
  3. Enable the Snowplow flag by running the command: echo "Feature.enable(:product_analytics_snowplow_support)" | rails c.
  4. Set up a new project and onboard it with Snowplow via Project → Analytics → Dashboards.
  5. Track some events and page views for the project via the SDK.
  6. Visit the Behaviour dashboard at Project → Analytics → Dashboards -> Behavior and verify panels display correct data

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #413633 (closed)

Edited by Elwyn Benson

Merge request reports