Skip to content

Commit

Permalink
fix: Rename channel type Other to Unknown (#21699)
Browse files Browse the repository at this point in the history
* Rename channel type Other to Unknown

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
robbie-c and github-actions[bot] authored Apr 22, 2024
1 parent a880b1a commit a6618bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions posthog/hogql/database/schema/channel_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def wrap_with_null_if_empty(expr: ast.Expr) -> ast.Expr:
match({campaign}, '^(.*video.*)$'),
'Paid Video',
'Paid Other'
'Paid Unknown'
)
),
Expand All @@ -125,7 +125,7 @@ def wrap_with_null_if_empty(expr: ast.Expr) -> ast.Expr:
match({medium}, 'push$'),
'Push',
'Other'
'Unknown'
)
)
)""",
Expand Down
12 changes: 6 additions & 6 deletions posthog/hogql/database/schema/test/test_channel_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,15 @@ def test_organic_video(self):
),
)

def test_no_info_is_other(self):
def test_no_info_is_unknown(self):
self.assertEqual(
"Other",
"Unknown",
self._get_initial_channel_type({}),
)

def test_unknown_domain_is_other(self):
def test_unknown_domain_is_unknown(self):
self.assertEqual(
"Other",
"Unknown",
self._get_initial_channel_type(
{
"$initial_referring_domain": "some-unknown-domain.example.com",
Expand All @@ -252,7 +252,7 @@ def test_unknown_domain_is_other(self):

def test_doesnt_fail_on_numbers(self):
self.assertEqual(
"Other",
"Unknown",
self._get_initial_channel_type(
{
"$initial_referring_domain": "example.com",
Expand Down Expand Up @@ -318,7 +318,7 @@ def test_firefox_google_search_for_shoes(self):
def test_daily_mail_ad_click(self):
# go to daily mail -> click ad
self.assertEqual(
"Paid Other",
"Paid Unknown",
self._get_initial_channel_type_from_wild_clicks(
"https://www.vivaia.com/item/square-toe-v-cut-flats-p_10003645.html?gid=10011676&currency=GBP&shipping_country_code=GB&gclid=EAIaIQobChMIxvGy5rr_ggMVYi0GAB0KSAumEAEYASABEgLZ2PD_BwE",
"https://2bb5cd7f10ba63d8b55ecfac1a3948db.safeframe.googlesyndication.com/",
Expand Down

0 comments on commit a6618bb

Please sign in to comment.