Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The page_location_with_gclid_is_cpc fails when using UTMs for attribution #339

Open
dgitis opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@dgitis
Copy link
Collaborator

dgitis commented Aug 13, 2024

In the detect_gclid section of the stg_ga4__events file, we only over-ride when the source/medium etc... is null so that people can add UTMs to their URLs and customize the source/medium better than what the package offers.

        case
            when (page_location like '%gclid%' and event_source is null) then "google"
            else event_source
        end as event_source,

The test does not account for the presence of UTMs.

-- 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.

{{config(
    severity = 'warn'
)}}
select
    count(event_source) as sources
    , count(event_medium) as mediums
from {{ref('stg_ga4__events')}}
where original_page_location like '%gclid%'
    and event_source != 'google'
    and event_medium != 'cpc'
having sources > 0
    or mediums > 0

As this test is set to warn only, it is not a huge issue but should be fixed at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant