Page MenuHomePhabricator

Recent Email Sends Have No Clicks
Closed, ResolvedPublicBUG REPORT

Description

Data is not populating in pgehres.donatewiki_counts for some recent email sends, despite them having donations.

Query below:

SELECT
    CASE
		WHEN donatewiki.utm_source IN ('70761231')
			THEN 'sp70761231'
		ELSE donatewiki.utm_source
    END AS utm_source,
    SUM(donatewiki.count) AS donatewiki_clicks
FROM pgehres.donatewiki_counts AS donatewiki
where donatewiki.utm_source in
('sp73399844',
'sp73399864',
'sp73399872',
'sp73399880',
'sp73399857',
'sp73399879',
'sp73399852',
'sp73399875')
GROUP BY 
	CASE
		WHEN donatewiki.utm_source IN ('70761231')
			THEN 'sp70761231'
		ELSE donatewiki.utm_source
    END;

Event Timeline

Hi fr-tech. Just for context, we set up clicktracking like normal in the email, but we were expecting to see click data from the donation landing page. The other donation data from the landing page is showing except for the click data.

Hi @nisrael, can you copy some of the donatewiki links from an affected email here?

The job is still running and we DO see recent click data (less than 15 min old) in donatewiki_unique for mailings sp73413733, sp73413742, sp73399410, sp73413729, sp73407749, etc. Those numbers are aggregated as expected to donatewiki_counts.

So there must be something different with this group of emails, perhaps not including all the parameters the click counter is expecting.

Thank, @nisrael ! I've just rotated off the chaos crew back to features, but those links should help the next investigators. @nisrael what was the MAILING_ID of that specific mailing you pasted the links from, so we can search for it in the raw web logs?

Hi @nisrael, having ran a test on the email, I noticed the contact_id parameter is empty, could it be the template isn't populating that field?

This would explain the missing metrics, because the code responsible for populating this table requires that the contact_id field be set. You can also confirm this by running the same query on the landingpageimpression_raw table, which doesn't require the contact_id field.

Aha, you're missing an ampersand before the contact id!

... &contact_hash=%%CONTACT_HASH%%contact_id=%%CONTACTID%%& ...

So it's just being tacked onto the value of the previous parameter contact_hash

XenoRyet set Final Story Points to 4.

This is done from our perspective, @nisrael - let us know if there's anything else.

It looks like this is happening for sp73528716 and sp73532353 as well (no clicks in pgehres.donatewiki_counts). Could we investigate if this is the same issue? @NNgu-WMF could you comment the links from the send as Noah did for the previous ones?

@NNgu-WMF There's no contact_id populated in that link - what does the raw code for that link look like in the email template?

I'm trying to find that email in the Acoustic UI but I have no idea how to search by email ID or campaign, and I haven't hit on it yet just browsing through the Major Gifts campaign folders. Can you tell me how to navigate to it?

Here are the email names, you should be able to find them by searching Email campaigns:

3_20231026_UnitedStates(US)_English(en)_MGEvents_Invitation-Designed
4_20231026_UnitedStates(US)_English(en)_MGEvents_Invitation-Plain

Let me know if this works!

OK, the problem is in the template. There is no token in the URL for contact ID

So you'd want to change the link from e.g.:
https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&country=US&uselang=en&utm_medium=MGFE&utm_source=sp73476249&utm_campaign=EV1V23&1=1&appeal=Appeal-JimmyQuote&contact_id=&hpc=100&link_id=text_link_donate&retried=1
to:
https://donate.wikimedia.org/w/index.php?title=Special:LandingPage&country=US&uselang=en&utm_medium=MGFE&utm_source=sp73476249&utm_campaign=EV1V23&1=1&appeal=Appeal-JimmyQuote&contact_id=%%ContactID%%&hpc=100&link_id=text_link_donate&retried=1

Looking through some other sent mailings I see more links missing contact ID params or tokens. For example this one has the contact_hash parameter and token but no contact_id: "Test - 3_20230905_Netherlands(NL)_English(en)_RMLEmail3_Redesign-CopyUrgency"

Perhaps the mailing team should add a QA step to ensure that contact_id is always populated on the links?