Hey there,
We are seeing a few recent emails with donation asks not having any donations or donate wiki clicks come through. They were soft asks, but figure we should make sure everything is in order on the links. Queries:
SELECT
t.utm_medium,
LEFT(t.utm_source,10) AS mailing_identifier,
c.contact_id,
c.id,
c.total_amount
FROM civicrm.civicrm_contribution AS c
LEFT JOIN civicrm.civicrm_value_1_communication_4 AS comm ON c.contact_id = comm.entity_id
LEFT JOIN drupal.contribution_tracking AS t ON c.id = t.contribution_id
WHERE c.receive_date >= '2023-01-01'
AND c.contribution_status_id = 1 /* only pull completed transations */
AND c.financial_type_id <> 14 /* remove refunds */
AND c.contact_id <> 42572457 /* remove WMF fund-to-fund internal transfers */
AND LEFT(t.utm_source,10) in ('sp73859018','sp73859020','sp73863609','sp73863614');SELECT
donatewiki.utm_source,
SUM(donatewiki.count) AS donatewiki_clicks
FROM pgehres.donatewiki_counts AS donatewiki
where donatewiki.utm_source in ('sp73859018','sp73859020','sp73863609','sp73863614')
GROUP BY utm_source;