====== Custom channel grouping ====== Requirements for this tutorial: Working setup of Windsor.ai multitouch attribution enabled. In this example we're going to set up a custom channel grouping in Windsor.ai. The implementation is done using a PostgreSQL case statement. To access your Channel Groupings head to the [[https://charts.windsor.ai/tablemodelview/list/?pageIndex=0&sortColumn=changed_on_delta_humanized&sortOrder=desc|Dataset management section]] on [[https://charts.windsor.ai/w/welcome?|Windsor.ai charts]]. Here you will see a list of data sets. * Click on edit on the dataset called **[user-name]_attributions_and_costs** {{ :edit-charts-datasource.png?nolink&600 |}} * Click on **CALCULATED COLUMNS** and expand the channelgrouping column {{ :edit_channelgrouping_charts.png?nolink&600 |}} * Now you can easily adjust your channel groupings. The standard setup replicates the standard channel groupings of Google Analytics: CASE WHEN source = '(direct)' AND (medium = '(not set)' OR medium = '(none)') THEN 'Direct' WHEN medium = 'organic' THEN 'Organic Search' WHEN medium ~ '^(social|social-network|social-media|sm|social network|social media|paids-social)$' THEN 'Social' WHEN medium = 'email' THEN 'Email' WHEN medium = 'affiliate' THEN 'Affiliates' WHEN medium = 'referral' THEN 'Referral' WHEN medium ~ '^(cpc|ppc|paidsearch)$' THEN 'Paid Search' WHEN medium ~ ' ^(cpv|cpa|cpp|content-text)$' THEN 'Other Advertising' WHEN medium ~ '^(display|cpm|banner)$' THEN 'Display' ELSE '(Other)' END In this example we're going to customise the standard channel grouping to add branded and generic paid search: CASE WHEN source = '(direct)' AND (medium = '(not set)' OR medium = '(none)') THEN 'Direct' WHEN medium = 'organic' THEN 'Organic Search' WHEN medium ~ '^(social|social-network|social-media|sm|social network|social media|paids-social)$' THEN 'Social' WHEN medium = 'email' THEN 'Email' WHEN medium = 'affiliate' THEN 'Affiliates' WHEN medium = 'referral' THEN 'Referral' WHEN medium ~ '^(cpc|ppc|paidsearch)$' AND campaign ~ '(brand)' THEN 'Branded - Paid Search' WHEN medium ~ '^(cpc|ppc|paidsearch)$' AND campaign !~ '(brand)' THEN 'Generic - Paid Search' WHEN medium ~ ' ^(cpv|cpa|cpp|content-text)$' THEN 'Other Advertising' WHEN medium ~ '^(display|cpm|banner)$' THEN 'Display' ELSE '(Other)' END * Once you are finished click the **SAVE** button and reload and refresh your dashboard. The new channel groupings will now be active. {{ :save_channel_groupings.png?nolink&600 |}}