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

[Feature request] Support many-to-one mapping of media variables to channels #453

Open
aazimh opened this issue Jan 30, 2025 · 2 comments
Open

Comments

@aazimh
Copy link

aazimh commented Jan 30, 2025

Current Behavior

Currently, Meridian validates that media channel names must be unique across media_channel and rf_channel, throwing a ValueError if there are duplicate channel names. However, as far as I can tell, this check is happening on the post-mapping channel names, not the variable names themselves. This causes an issue when trying to map multiple variables in the raw data to one 'channel', as the mappings are considered duplicates.

To be clear, I am referring to the mapping done in the correct_media_to_channel and correct_spend_to_channel dictionaries.

Use Case

In marketing analytics generally, and definitely in my personal case at work, we commonly split out variables for a channel by year, half-year or quarter to try and capture differences in performance. For example, Google_Ads_2022, Google_Ads_2023 and Google_Ads_2024 would be 3 different variables in the model, but all pertain to one channel (Google Ads). Usually, we manually roll up the contributions of these variables for analysis and reporting purposes after the model has been built. Other reasons for splitting variables within the same channel could be:

  • Multiple campaigns/tactics for the same channel (e.g., "Baidu_Keywords" and "Baidu_Static" both representing different Baidu tactics)
  • Different creative types or targeting approaches within the same channel

When I saw the option to map variables to channels for final reporting, I assumed that this is what was meant. However, I now realize that this is probably just to allow linking impression and spend variables together (happy to be corrected if there is another reason for it).

Proposed Solution

Consider adding support for intentional many-to-one mapping of media variables to channels. This could be through:

  1. A configuration parameter to allow duplicate channel names when they come from mapped variables (could be switched off by default to preserve current behaviour)
  2. Automatic aggregation of variables mapped to the same channel (less ideal)

This would make things a lot more flexible for scenarios where data granularity differs from the necessary reporting granularity. The idea would be to aggregate contributions and spend across the sub-variables that map to a common channel, and then report on metrics like ROI, contribution, CPIK etc. at the aggregated level. Of course, this cannot apply to response curves, and I think by extension may not be able to apply to things like effectiveness and marginal ROI (less sure about that), but those elements can stay as they are.

Disclaimer - I am not qualified enough to try to submit a pull request for something like this, which is why I'm creating an issue instead to see if this is something that has wider appeal or something the team has under consideration. Thank you!

@aazimh aazimh changed the title Support many-to-one mapping of media variables to channels [Feature request] Support many-to-one mapping of media variables to channels Jan 30, 2025
@dattatreyam23
Copy link
Collaborator

Hi @aazimh,

Thank you for reaching out to the Google Meridian support team.

Currently, Meridian enforces unique media_channel mappings, which can cause conflicts when consolidating multiple media variables into a single channel.

For your first use case regarding the Google_Ads, if you want to filter your view by time, so as to capture differences, we suggest you to combine the channels that are split by year (Google_Ads_2022, Google_Ads_2023 and Google_Ads_2024) into one channel (i.e., concatenating the year-long time series into one time series), and then use the selected_times attribute in the Analyzer module in Meridian.

Please note that this method will work as an alternative if you are to consider very different spend levels each year. However, if your goal is to get around the lack of time-varying media effects in Meridian, this workaround wouldn’t be fruitful. To know more about the nuances, kindly check our following documentations here[1][2].

Multiple components/tactics, mapping to the same channel, requires grouping them into categories based on their similarity and aggregating their corresponding spend/ impressions. This is currently not supported in Meridian, and hence Meridian will consider them as separate channels. Again, a suitable alternative would be to try different granularities forChannel Tactics, Creative/Targeting approach etc., and see what the data can support, since it is to be recognized that the data may not always be able to support more granular channels [Ref. here]

We appreciate your feedback and shall take it into consideration for our upcoming releases. Our team is constantly working on improving Meridian's functionality and you may check the unreleased features on the CHANGELOG page in GitHub.

Feel free to reach out if you have any questions or suggestions regarding Meridian.

Thank you,

Google Meridian Support Team

@aazimh
Copy link
Author

aazimh commented Feb 11, 2025

Clear, thank you. Would be great if this is something that is added to the roadmap to be implemented down the line as it is a time-consuming task that needs to be done manually when it comes to reporting regardless of the framework used, so could be a nice differentiator for Meridian. Appreciate the response!

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

No branches or pull requests

2 participants