Let’s look at our marketing attribution query one last time and replay our thought experiment:
WITH users_pvs AS ( SELECT ROW_NUMBER() OVER(PARTITION BY p.visitor_id ORDER BY p.created_at ASC), u.id AS users_id, * FROM web_analytics.pageviews p INNER JOIN users u ON u.visitor_id = p.visitor_id WHERE user_id IS NULL ) SELECT users_id, url, SPLIT_PART(SPLIT_PART(url, 'utm_campaign=', 2), '&', 1), SPLIT_PART(SPLIT_PART(url, 'utm_source=', 2), '&', 1), SPLIT_PART(SPLIT_PART(url, 'utm_medium=', 2), '&', 1), SPLIT_PART(SPLIT_PART(url,...