Skip to content

Allow Snowplow Compatible Funnel SQL

What does this MR do and why?

Updates funnel queries in product analytics when using the product_analytics_snowplow_support feature flag

How to set up and validate locally

  1. Setup the product analytics devkit
  2. Define funnels using example file from the documentation in your project at .gitlab/product_analytics/funnels in the repo
  3. Enable the product_analytics_snowplow_support feature flag
  4. GET the API at http://gdk.test:3000/api/v4/projects/(project id)/product_analytics/funnels
  5. The response should be similar to
[
	{
		"name": "completed_purchase",
		"sql": "      SELECT\n        (SELECT max(derived_tstamp) FROM snowplow_events) as x,\n        windowFunnel(3600)(toDateTime(derived_tstamp), page_urlpath = '/page1.html', page_urlpath = '/page2.html', page_urlpath = '/page3.html') as step\n        FROM gitlab_project_2.snowplow_events\n",
		"steps": [
			"page_urlpath = '/page1.html'",
			"page_urlpath = '/page2.html'",
			"page_urlpath = '/page3.html'"
		]
	}
]
  1. Specifically, make sure the sql is selecting from snowplow_events instead of jitsu

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 #399234 (closed)

Edited by Allen Cook

Merge request reports