Skip to content

Commit

Permalink
broaden test scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dgitis committed Mar 12, 2024
1 parent d3b46f5 commit 1915349
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tests/page_location_with_gclid_is_cpc.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
-- Google has changed the combination of parameters that are used to identify a CPC source in the past.
-- In order to detect new changes, this test checks that a page_location with a gclid is classified as cpc.
-- The purpose of this test is to detect changes in the source classification of CPC traffic.
-- As a result, it defaults to testing only the last static_incremental_days worth of tests.

{% set partitions_to_replace = ['current_date'] %}
{% for i in range(var('static_incremental_days', 1)) %}
{% set partitions_to_replace = partitions_to_replace.append('date_sub(current_date, interval ' + (i+1)|string + ' day)') %}
{% endfor %}
{{config(
severity = 'warn'
)}}
Expand All @@ -17,6 +11,5 @@ from {{ref('stg_ga4__events')}}
where page_location like '%gclid%'
and event_source != 'google'
and event_medium != 'cpc'
and event_date_dt in ({{ partitions_to_replace | join(',') }})
having sources > 0
or mediums > 0

0 comments on commit 1915349

Please sign in to comment.