Fundraising tech/tools

Landing page impression counter
Tallies hits to landing pages at wikimediafoundation.org and donate.wikimedia.org. Runs as a Django management task for some reason. [Operational details] are documented on wikitech.

It filters server logs and only considers a request to be a landing page hit if it matches certain patterns. In the table below, patterns are listed as prefixes of any wiki page title. For example, the Support_Wikipedia pattern would include https://wikimediafoundation.org/wiki/Support_Wikipedia_in_2016.

Special:FundraiserLandingPage on donatewiki is treated as a special case. For this special page, the 'landingpage' value is a tilde-separated list of these querystring parameters: "template", "appeal-template", "appeal", "form-template", and "form-countryspecific".

All landing page hits are added to the landingpageimpressions_raw table, including timestamp, utm_source, utm_campaign, utm_key, utm_medium, landingpage, project_id, language_id, and country_id.

Email click counts
Hits to donatewiki landing pages that include a contact_id parameter are also added to the donatewiki_unique table with timestamp, utm_source, utm_campaign, contact_id, and link_id. Each combination of utm_source and contact_id can only occur once in this table, so it should be an accurate count of the number of unique donors clicking some link in each email. These are aggregated in view donatewiki_counts by utm_source, utm_campaign, and link_id.