mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
125 stars 41 forks source link

Conversions from an email not appearing in FB Container conversion dashboard #13686

Closed LaurenNiolet closed 4 years ago

LaurenNiolet commented 4 years ago

Describe the problem and steps to reproduce it:

What happened?

Created a marketing email to promote Facebook Container. Sent a proof internally of the email. Clicked the link many times (~12-14) over four days and installed container with the ?src=external-email-facebookcontainer in the url (see below for full link).

Haven't seen the parameter yet in the extension's dashboard, although I'm seeing other marketing channels that are also promoting the extension.

What did you expect to happen?

Expected to see external-email-facebookcontainer as a source for "downloads" for the extension.

Anything else we should know?

Here's the full URL from the email:

https://addons.mozilla.org/addon/facebook-container/?src=external-email-facebookcontainer&utm_medium=email&utm_source=2020fxnews-en&utm_campaign=feb2020&utm_content=chrta-fbc

jvillalobos commented 4 years ago

I followed the same link and downloaded the extensions a couple of days ago, so I can confirm the download isn't being reflected in the stats dashboard. I can see that the visits are being logged in Google Analytics, so there must be some problem recording the download or attributing it to the src value.

willdurand commented 4 years ago

I followed the same link and downloaded the extensions a couple of days ago, so I can confirm the download isn't being reflected in the stats dashboard. I can see that the visits are being logged in Google Analytics, so there must be some problem recording the download or attributing it to the src value.

Should this issue be moved to addons-server if this is about the stats dashboard?

jvillalobos commented 4 years ago

I'm not sure if the problem is how we handle the src parameter, and maybe URL redirects. That's why I asked Lauren to file it here first.

willdurand commented 4 years ago

Right. I am not sure I fully understand the issue yet tbh. It reminds me of https://github.com/mozilla/addons/issues/13272, although there is no mention of client-side navigation.

In terms of src parameter, I don't recall any specific code to handle it. Was it working before by chance? (or supposed to work?) I am curious about why this is an issue now.

jvillalobos commented 4 years ago

At least in my case, I visited the page using the direct URL mentioned above and downloaded the extension right away, so it wouldn't be the same as mozilla/addons#13272. Maybe it could be because the URL is the canonical one (no locale or application) and then it redirects to the specific one, but I still see the src param, so I don't know.

In terms of src parameter, I don't recall any specific code to handle it. Was it working before by chance? (or supposed to work?) I am curious about why this is an issue now.

I can see two other values that are recorded in the dashboard for Facebook Container: external-snippet-facebookcontainer and external-www.mozilla.org-facebookcontainer. So, it's working for those two. The external- bit is something we tell developers to use, but I don't know if we special-case it somehow.

This is coming up now because of the campaign that is planned for next week. It's the same that https://github.com/mozilla/addons/issues/13678 and related issue were about.

muffinresearch commented 4 years ago

The link in the markup looks correct.

Facebook_Container_–_Get_this_Extension_for_🦊_Firefox__en-US_

However, the request to download the add-on is showing as https://addons.mozilla.org/firefox/downloads/file/3519841/facebook_container-2.1.0-fx.xpi?src=dp-btn-primary in the browser console when installed by mozAddonManager.

So presumably we need to override the attribution to the page button if there's a src in the URL?

Would that would be for set of special cases or everything that passes a src param?

jvillalobos commented 4 years ago

So presumably we need to override the attribution to the page button if there's a src in the URL?

Yes. I wonder how src is being recorded at all without that working. Would it only work if a page links directly to the XPI with the src set?

Would that would be for set of special cases or everything that passes a src param?

If you land on the listing page with a src set, that should be attribution we record.

willdurand commented 4 years ago

I wonder how src is being recorded at all without that working. Would it only work if a page links directly to the XPI with the src set?

Edit: It's possible that src is only being recorded for direct download of xpis, but I am not sure (i.e. not when installed using the button).

willdurand commented 4 years ago

Edit: It's possible that src is only being recorded for direct download of xpis, but I am not sure (i.e. not when installed using the button).

I confirm this has never worked before. Our wrapper of the mozAddonManager replaces the src value in the install URL by the default install source, all the time.

ioanarusiczki commented 4 years ago

@willdurand I installed from dev this one: https://addons-dev.allizom.org/en-US/firefox/addon/facebook-container/?src=external-email-facebookcontainer&utm_medium=email&utm_source=2020fxnews-en&utm_campaign=feb2020&utm_content=chrta-fbc Also this one: https://addons-dev.allizom.org/en-US/firefox/addon/facebook-containertest/?src=external-email-facebookcontainer&utm_medium=email&utm_source=2020fxnews-en&utm_campaign=feb2020&utm_content=chrta-fbc I'll be waiting a day or so to see the stats too. As I understand from the issue - I should see these as being installed today - 16.03.2020.

willdurand commented 4 years ago

@ioanarusiczki I think observing the network requests would work too

ioanarusiczki commented 4 years ago

@willdurand It worked for me:

it worked

Verified on dev with FF74(Win10).