Velir / dbt-ga4

dbt Package for modeling raw data exported by Google Analytics 4. BigQuery support, only.
MIT License
324 stars 135 forks source link

Query string all #338

Closed dgitis closed 3 months ago

dgitis commented 3 months ago

Description & motivation

Initially, I wanted to add an *all* flag to the remove query string feature.

When writing the tests, I discovered that the remove query string only removed question and ampersand query strings but not hash strings which may not technically be query strings but are sometimes used as such.

In fixing the regular expression, I ended up simplifying it and added tests to ensure that the new regex works as expected.

We may want to add the following to the release notes when pushing this live.

The query_parameter_exclusions variable now removes fragments, hash # parameters, from page_location and page_referrer. In most cases this will be an improvement in functionality. However, if you have query parameter keys using question mark, ?, or ampersand, &, that you want to remove and fragments that you don't want to remove, then you will need to override the remove_query_parameters macro.

Checklist

adamribaudo-velir commented 3 months ago

Looks great. thanks for adding the unit test. I need to figure out how to get the dbt unit tests to run on PR updates, but I can do that separately. The unit tests passed.