Closed Bug 1741795 Opened 3 years ago Closed 3 years ago

Make "More from Mozilla" content customizable by partner repacks

Categories

(Firefox :: Messaging System, task, P1)

task

Tracking

()

VERIFIED FIXED
98 Branch
Iteration:
98.1 - Jan 10 - Jan 23
Tracking Status
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 --- verified

People

(Reporter: hectorz, Assigned: pdahiya)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

For "Firefox Mobile", the Beijing office would like to change the URL (either button event or QR code) from www.mozilla.org to its equivalent at www.firefox.com.cn (a rebase onto more recent www.mozilla.org content is underway).

I believe the "Mozilla VPN" part is covered by bug 1741741.

(Updated to remove the original paragraph about "Mozilla Rally")

Assignee: nobody → pdahiya
Iteration: --- → 96.2 - Nov 15 - Nov 28
Priority: -- → P1
Iteration: 96.2 - Nov 15 - Nov 28 → 96.3 - Nov 29 - Dec 6

[Tracking Requested - why for this release]:
Needed for releasing More From Mozilla as feature in Fx96

Removing tracking request for Fx96 as More From Mozilla is no longer targeted to be rolled out as feature in Fx96. Thanks

Hi Hector , quick question, is there a pref thats configured in partner builds and should be read to pick mobile link (www.firefox.com.cn) or should we create one . Please feel free to suggest if there is a better approach to fix this issue Thanks!

Flags: needinfo?(bzhao)

(In reply to Punam Dahiya [:pdahiya] from comment #4)

Hi Hector , quick question, is there a pref thats configured in partner builds and should be read to pick mobile link (www.firefox.com.cn) or should we create one . Please feel free to suggest if there is a better approach to fix this issue Thanks!

Hi Punam,

In my opinion, the optimal way would actually be including our URL in m-c directly and use it when distribution.id is set to MozillaOnline on default branch, which is the most reliable way to detect our repack. This also makes the way that we're customizing it more visible. The shortcoming is this won't scale if other partners want this too.

Alternatively and more generic, we could agree on a pref key and then override it in our repack. However overriding it in the distribution.ini file would only works for new profiles, and we'll have to override it with our extension for existing profiles, which could be later uninstalled by an user or disabled by incidents like armagadd-on-2.0 (bug 1548973).

An existing pref we're already overriding is browser.contentblocking.report.mobile-android.url, but its name is very specific.

I hope this is helpful.

Flags: needinfo?(bzhao)
Assignee: pdahiya → nobody
Assignee: nobody → dmosedale

NI @hectorz to confirm for Settings -> More From Mozilla -> Firefox Mobile card for ChinaRepack
a) Learn More link should point to just "https://www.firefox.com.cn" or "https://www.firefox.com.cn/firefox/browsers/mobile/"
b) Firefox Mobile product card has a Send Email link that will be updated to "https://www.mozilla.org/firefox/mobile/get-app", is it ok for ChinaRepack to use "https://www.mozilla.org/firefox/mobile/get-app"

See https://searchfox.org/mozilla-central/source/browser/components/preferences/moreFromMozilla.js#79. Thanks

Flags: needinfo?(bzhao)

Hi Punam,

(In reply to Punam Dahiya [:pdahiya] from comment #6)

NI @hectorz to confirm for Settings -> More From Mozilla -> Firefox Mobile card for ChinaRepack
a) Learn More link should point to just "https://www.firefox.com.cn" or "https://www.firefox.com.cn/firefox/browsers/mobile/"

Please use "https://www.firefox.com.cn/browsers/mobile/"

b) Firefox Mobile product card has a Send Email link that will be updated to "https://www.mozilla.org/firefox/mobile/get-app", is it ok for ChinaRepack to use "https://www.mozilla.org/firefox/mobile/get-app"

Please use "https://www.firefox.com.cn/mobile/get-app/"

See https://searchfox.org/mozilla-central/source/browser/components/preferences/moreFromMozilla.js#79. Thanks

(In reply to Hector Zhao [:hectorz] from comment #0)

...(a rebase onto more recent www.mozilla.org content is underway).

The said rebase is not yet ready, and the two urls above are not available yet, but I'll make sure they redirect to proper alternatives.

Thanks!

Flags: needinfo?(bzhao)

Hector, is the plan that the rebase will be done before 97 hits release?

Separately from that, there are a few more questions:

  • What do we want to do about the utm_* params on the China site, if anything? (Hector and/or Venetia)
  • What do we want to do about the UI telemetry, if anything? Create more permutations of the element IDs? (Punam, Venetia, and perhaps Hector)
  • Is there any way to use the same QR codes and have Adjust redirect to different URLs depending on whether this is part of the China repack? (I'm having a hard time imagining that this is true, but if Punam and Venetia agree that it is, it would mean that we don't necessarily want/need new QR code images).
  • If we do need new QR code images, we will need two: one for light mode and one for dark mode, and I'd guess these would come from some combination of data science, Venetia, and Ryan. Can someone confirm?

As far as code changes go, checking the preferences is straightforward (Hector wrote some code for this for ASRouter at https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/ASRouterTargeting.jsm#583), and changes here would be almost identical. There would also be need to be a bit of tweaking on computing the new QR code filenames, if we need QR codes. This should also be straightforward.

Because of all these unknowns, I suspect it's going to be hard to move this forward meaningfully before the first week of January. If I'm wrong, anyone (Punam? Meg?) should feel free to grab this bug and run with it. If not, feel free to leave it with me.

That said, if we do need to uplift a change like this, I wouldn't expect it to be a big deal. But if we could get it landed by the first week of January, I imagine it would be neat. :-)

Flags: needinfo?(vtay)
Flags: needinfo?(pdahiya)
Flags: needinfo?(bzhao)

(In reply to Dan Mosedale (:dmosedale, :dmose) from comment #8)

Hector, is the plan that the rebase will be done before 97 hits release?

Yes, we hope so.

Separately from that, there are a few more questions:

  • What do we want to do about the utm_* params on the China site, if anything? (Hector and/or Venetia)

GA is enabled on www.firefox.com.cn (bug 1444809) and I believe global marketing team has access to the data. Simiply use the same utm_* params as global site works for me.

...

  • Is there any way to use the same QR codes and have Adjust redirect to different URLs depending on whether this is part of the China repack? (I'm having a hard time imagining that this is true, but if Punam and Venetia agree that it is, it would mean that we don't necessarily want/need new QR code images).

I don't think there's any information exposed for Adjust to identify a partner repack vs. a vanilla Fx.

...

Thanks!

Flags: needinfo?(bzhao)

Thanks for helping clarify, assigning myself to attach initial implementation.

Assignee: dmosedale → pdahiya
Flags: needinfo?(pdahiya)

NI @Ryan @vtay to help provide QR code svg for CN region that should point to
https://www.firefox.com.cn/mobile/qrcode-redirect/ and requisite utm_* params Thanks!

https://phabricator.services.mozilla.com/D134574#4383290

Flags: needinfo?(rcasey)
Iteration: 96.3 - Nov 29 - Dec 6 → 97.3 - Jan 3 - Jan 10

@hector I'm looking at the link Punam posted.

Can I confirm -

  1. Is this link https://www.firefox.com.cn/mobile/qrcode-redirect/ for the "Learn more" section?

  2. I noticed there is already a QR code on the website ( after you click the "Get Firefox" green button --> it goes to a QR code page).
    a) How might this QR code be different from the QR we will generate and put on More for Mozilla?
    b) I tested this QR code and it sends me to the App Store (i have an iphone) - will it redirect an Android user to the Google Play store? {Also not sure if it directing this way coz I'm outside of CN)
    c) Is there a reason we would need the user to scan 2 QR codes to download ( first QR on More from Mozilla to get to this page; another QR code to download).

Flags: needinfo?(vtay) → needinfo?(bzhao)

Hi Venetia,

(In reply to Venetia from comment #13)

@hector I'm looking at the link Punam posted.

Can I confirm -

  1. Is this link https://www.firefox.com.cn/mobile/qrcode-redirect/ for the "Learn more" section?

"Learn more" should link to "https://www.firefox.com.cn/browsers/mobile/", "https://www.firefox.com.cn/mobile/qrcode-redirect/" is only intended to be QR code target URL.

  1. I noticed there is already a QR code on the website ( after you click the "Get Firefox" green button --> it goes to a QR code page).
    a) How might this QR code be different from the QR we will generate and put on More for Mozilla?

That QR code points to the page itself at "https://www.firefox.com.cn/mobile/qrcode-redirect/" and is desktop only. I think you can see it as a way to share the page URL from desktop browser to a mobile device.

b) I tested this QR code and it sends me to the App Store (i have an iphone) - will it redirect an Android user to the Google Play store? {Also not sure if it directing this way coz I'm outside of CN)

The page when opened in a mobile device will:

  1. if on iOS, redirect to App Store;
  2. if with Tencent's WeChat on Android (the every day messaging app almost every Chinese users have, and a popular choice as QRCode scanner), redirect to the Android App Store run by Tencent (direct APK link as mentioned in 3) will be blocked);
  3. if with other app on Android, stay on the page, with direct APK link available. We don't link to any Android app store, since Google Play is not really available here and every manufacturer has their own store. (see Fenix CN manufacturer/install_source for reference).

c) Is there a reason we would need the user to scan 2 QR codes to download ( first QR on More from Mozilla to get to this page; another QR code to download).

No, the user doesn't need to scan 2 QR codes. They only need to scan the one on More from Mozilla and what's described above will happen.

Flags: needinfo?(bzhao)

thank you very much @hector.

China Specific QR code: https://mzl.la/336dbtt

We create short-links for the QR code image generation so that it creates a simpler pattern (not as dense). For reference:
long link: https://www.firefox.com.cn/mobile/qrcode-redirect/?utm_medium=firefox-desktop&utm_source=about-prefs&utm_campaign=morefrommozilla&utm_content=default-cn)

Flags: needinfo?(rcasey)

SVG QR code for CN version

Blocks: 1749245
Iteration: 97.3 - Jan 3 - Jan 9 → 98.1 - Jan 10 - Jan 23

@rcasey looks like the attached cn svg is for size that works for advanced template. Will appreciate if you can attach svg in 80x80 similar to simple template svg for non-cn regions thanks

https://searchfox.org/mozilla-central/source/browser/components/preferences/more-from-mozilla-qr-code-simple.svg

Flags: needinfo?(rcasey)

Oops, my bad, uploading the correct-sized version now.

Flags: needinfo?(rcasey)

80px X80px QR code svg file for CN

@hector Could you try this QR code to see if it works as intended?

Flags: needinfo?(bzhao)

(In reply to Venetia from comment #20)

@hector Could you try this QR code to see if it works as intended?

Hi Venetia,

It looks like the "mzl.la" domain may not be reliably accessible from China, it doesn't load when I test from mobile carrier networks in Beijing.

Sorry I didn't catch this earlier while testing from our office's Wi-Fi network.

I'm still figuring out the available local url shortners and short domain names we own. Keeping ni for now.

Interesting! If you can't find any local url shorters, the other option is for @rcasey to create the QR code using the long link (it will be more dense). Please let us know if we should try that

Flags: needinfo?(rcasey)

(In reply to Venetia from comment #22)

Interesting! If you can't find any local url shorters, the other option is for @rcasey to create the QR code using the long link (it will be more dense). Please let us know if we should try that

Thanks for the quick response.

I'm currently thinking of maybe setting up a redirect at https://mozilla.cn/mfm, which has the same length as https://mzl.la/336dbtt.

From a quick look, well-known local url shortners either require payment (dwz.cn by Baidu) or no longer provide public API/form to shorten new urls (t.cn by Sina/Weibo & url.cn by Tencent).

Flags: needinfo?(bzhao)

Can I confirm that the redirect will still have utm which the data science can measure?
If not, another option is measuring CN on its own and measuring the rest of world.

@Winne Chan thoughts?

Flags: needinfo?(wichan)

Hi Hector, please confirm if its ok to use 'https://mozilla.cn/mfm' as final URL (As of now its giving 404 and unsecure website) to generate CN QR Code or should we go for slightly denser QRCode that points to long link 'https://www.firefox.com.cn/mobile/qrcode-redirect/?utm_medium=firefox-desktop&utm_source=about-prefs&utm_campaign=morefrommozilla&utm_content=default-cn'.

Flags: needinfo?(bzhao)

(In reply to Punam Dahiya [:pdahiya] from comment #25)

Hi Hector, please confirm if its ok to use 'https://mozilla.cn/mfm' as final URL (As of now its giving 404 and unsecure website) to generate CN QR Code or should we go for slightly denser QRCode that points to long link 'https://www.firefox.com.cn/mobile/qrcode-redirect/?utm_medium=firefox-desktop&utm_source=about-prefs&utm_campaign=morefrommozilla&utm_content=default-cn'.

The redirection just went live (http => https included as well):

HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Thu, 13 Jan 2022 03:52:31 GMT
Content-Type: text/html
Content-Length: 154
Connection: keep-alive
Location: https://mozilla.cn/mfm

HTTP/2 302
server: nginx
date: Thu, 13 Jan 2022 03:52:31 GMT
content-type: text/html
content-length: 154
location: https://www.firefox.com.cn/mobile/qrcode-redirect/?utm_medium=firefox-desktop&utm_source=about-prefs&utm_campaign=morefrommozilla&utm_content=default-cn

HTTP/2 200
date: Thu, 13 Jan 2022 03:52:31 GMT
content-type: text/html; charset=utf-8
content-length: 35666
...
Flags: needinfo?(bzhao)

Thanks Hector! NI @rcasey to help generate QRCode svg that points to 'https://mozilla.cn/mfm' Thanks!

Updated QR code for CN that points to https://mozilla.cn/mfm.

Flags: needinfo?(rcasey)

(In reply to Punam Dahiya [:pdahiya] from comment #27)

Thanks Hector! NI @rcasey to help generate QRCode svg that points to 'https://mozilla.cn/mfm' Thanks!

I've attached an updated QR code here. @hectorz could you please verify it works on your end too? Thanks!

Thanks Ryan, Patch is updated with final svg for @hectorz to review.

(In reply to Ryan Casey from comment #29)

I've attached an updated QR code here. @hectorz could you please verify it works on your end too? Thanks!

Hi Ryan, yes, it works as expected.

(In reply to Venetia from comment #24)

Can I confirm that the redirect will still have utm which the data science can measure?
If not, another option is measuring CN on its own and measuring the rest of world.

@Winne Chan thoughts?

hi Venetia, As discussed, I am not familiar with utm tracking using qr codes / adjust links.

Flags: needinfo?(wichan)

Ok - let's move forward with the QR code with "https://mozilla.cn/mfm"

Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/22212426ae62 Make More from Mozilla content customizable by partner repacks r=preferences-reviewers,mviar,hectorz
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

I have verified this task on the Firefox Nightly CN locale build ( 98.0a1 Build ID - 20220117214941) on Windows 10, macOS 11.6, and Linux Mint 20.2. I can confirm that the QR code has the .svg extension and it is correctly displayed.

However, we observed the following:

  1. The “Learn more” hyperlink redirects to “https://www.mozilla.org/zh-CN/firefox/browsers/mobile/?utm_source=about-prefs&utm_campaign=morefrommozilla&utm_medium=firefox-desktop&utm_content=fxvt-113-a-na”.
  2. The “Send an email to your phone instead” hyperlink redirects to “https://www.mozilla.org/zh-CN/firefox/mobile/get-app/?utm_source=about-prefs&utm_campaign=morefrommozilla&utm_medium=firefox-desktop&utm_content=fxvt-113-a-na-email”.
  3. The QR code redirects to “https://mzl.la/30L3wba”.

@Punam could you please confirm if the above links are the correct ones?

Flags: needinfo?(pdahiya)

The links for CN build should point to

  1. QR code https://mozilla.cn/mfm (long link: https://www.firefox.com.cn/mobile/qrcode-redirect/?utm_medium=firefox-desktop&utm_source=about-prefs&utm_campaign=morefrommozilla&utm_content=default-cn)
  2. "Learn more" should link to "https://www.firefox.com.cn/browsers/mobile/..."
  3. " Send an email" should link to "https://www.firefox.com.cn/mobile/get-app/..."

Looks like build tested on is missing 'distribution.id' set to 'MozillaOnline'. NI Hector to help debug Thanks!

Flags: needinfo?(pdahiya) → needinfo?(bzhao)

(In reply to Punam Dahiya [:pdahiya] from comment #38)

Looks like build tested on is missing 'distribution.id' set to 'MozillaOnline'. NI Hector to help debug Thanks!

Hi Alice,

Please drop a copy of this distribution.ini file which sets the necessary prefs.

The file should "be placed in the distribution directory at the root of the Firefox install directory, or in the case of OS X in Firefox.app/Contents/Resources/distribution/.", or you can get the folder path by running Services.dirsvc.get("XREAppDist", Ci.nsIFile).path in Browser console.

Flags: needinfo?(bzhao)

Thank you Punam and Hector for the information provided!
By following these steps, I have successfully verified this task on the latest Firefox Nightly CN locale build (98.0a1 Build ID - 20220117214941) on Windows 10, macOS 11.6 and Ubuntu 20.4 x64 and I can confirm the following:

  1. The “Learn More” hyperlink redirects to “https://www.firefox.com.cn/browsers/mobile/?utm_source=about-prefs&utm_campaign=morefrommozilla&utm_medium=firefox-desktop&utm_content=fxvt-113-a-na".
  2. The “Send an email to your phone instead” hyperlink redirects to "https://www.firefox.com.cn/mobile/get-app/?utm_source=about-prefs&utm_campaign=morefrommozilla&utm_medium=firefox-desktop&utm_content=fxvt-113-a-na-email"
  3. The QR code redirects to “https://mozilla.cn/mfm”.
Status: RESOLVED → VERIFIED

Note: Since CN isnt supported by email, we will not be showing the "Send an email to your phone instead". We are currently working to remove the email link from all locales that aren't supported by email.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: