@JMando spotted that the channel for these 2 donations should be Wikipedia App not Direct_Mail
For the first contribution tracking is
"contribution_id": 131494427, "amount": 3.3500000000000001, "currency": "USD", "usd_amount": null, "is_recurring": false, "referrer": null, "utm_medium": "WikipediaApp", "utm_campaign": "Android", "utm_key": null, "gateway": "adyen", "appeal": null, "payments_form_variant": null, "banner": "enUS_appmenu_Android", "landing_page": "inapp", "payment_method_id": 243, "payment_submethod_id": 273, "language": "en", "country": "US", "tracking_date": "2025-10-09 21:18:47", "os": "Android", "os_version": null, "browser": "app", "browser_version": "2.7.50550-r-2025-09-22", "recurring_choice_id": null, "device_type_id": null, "banner_size_id": 3, "is_test_variant": true, "banner_variant": "appmenu", "is_pay_fee": null, "mailing_identifier": null, "utm_source": "enUS_appmenu_Android.inapp.google",
The code appears correct so I'm not sure where it's happening....
public function getChannel(): string {
if (!empty($this->message['Gift_Data.Channel'])) {
return (string) $this->message['Gift_Data.Channel'];
}
if (!empty($this->message['channel'])) {
return $this->message['channel'];
}
if ($this->isSubsequentRecurring()) {
// The first recurring goes to the solicted channel. After that to Recurring Gift.
return 'Recurring Gift';
}
if (!empty($this->message['recipient_id'])) {
return 'SMS';
}
$utmSource = $this->message['utm_source'] ?? '';
$utmMedium = strtolower($this->message['utm_medium'] ?? '');
if ($utmMedium === 'mail' || str_contains('DMURL', $utmSource)) {
return 'Direct_Mail';
}
if ($utmMedium === 'sitenotice'
// Endowment gifts put endowment in the medium...
|| ($this->isEndowmentGift() && str_starts_with($utmSource, 'B'))
) {
if (str_contains($utmSource, '_m_')
|| str_contains($utmSource, 'mob')
) {
return 'Mobile Banner';
}
if (str_contains($utmSource, 'dsk')) {
return 'Desktop Banner';
}
return 'Other Banner';
}
// Once the endowment banner check is done let's be case insensitive.
$utmSource = strtolower($utmSource);
if ($utmMedium === 'sidebar') {
return 'Sidebar';
}
if (str_starts_with($utmSource, 'sp') || $utmMedium === 'email') {
return 'Email';
}
if ($utmMedium === 'portal') {
if (($this->message['utm_campaign'] ?? '') == 'portalBanner') {
return 'Portal Banner';
}
else {
return 'Other Portal';
}
}
if (in_array($utmMedium, ['wikipediaapp', 'wikipediaappfeed'])) {
return 'Wikipedia App';
}
if (in_array($utmMedium, ['google', 'facebook', 'instagram', 'tiktok', 'threads'])) {
return 'Social Media';
}
return 'Other Online';
}