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

Channel and source data updates #4599

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Channel and source data updates #4599

wants to merge 2 commits into from

Conversation

ukutaht
Copy link
Contributor

@ukutaht ukutaht commented Sep 19, 2024

Changes

Some adjustments on how we handle and categorize source/channel data based on manual testing by @metmarkosaric.

Largely this includes 2 kinds of changes:

  1. Changes to how source data is categorized (i.e. transforming source perplexity.ai to Perplexity). These also include a migration to apply these changes to historical data
  2. Changes to how channels are derived from source data (i.e. Telegram should be Social instead of Referral). These will only apply going forward. Dealing with historical and already collected channel data is not in scope of this PR. Since channels are not live to customers yet it's ok to have them in a slightly broken state for a while. A follow-up PR will deal with historical channel data.

Another change is that I've introduced SOURCE_CATEGORY_EMAIL which is not present in the GA4 channel grouping definitions. The goal is that sessions with source=Gmail will have channel=email rather than channel=referral.

Most of the changes are tests.

Tests

  • Automated tests have been added

Documentation

  • Channels will be documented once ready to launch to customers

Dark mode

  • This PR does not change the UI

defmodule Plausible.IngestRepo.Migrations.RemapSources do
use Ecto.Migration

@mappings %{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could have used the @custom_sources and @mappings_overrides module attributes here, but decided to duplicate the list in case it changes in the future. Don't want migrations to reference dynamic code in general.

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

Successfully merging this pull request may close these issues.

1 participant