Closed Bug 1393699 Opened 7 years ago Closed 7 years ago

Include Pocket referer in Top Stories

Categories

(Firefox for Android Graveyard :: General, enhancement, P1)

ARM
Android
enhancement

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: liuche, Assigned: mcomella)

References

Details

(Whiteboard: [MobileAS])

Attachments

(3 files)

Splitting this out from bug 1380808.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1380808#c31 : 

There are a couple of ways off the top of my head to include the referer link:
- The Pocket API includes a Pocket link that adds the referer, but this causes a redirect and adds an extra history entry
- Send the referer ourselves when loading the link - http://searchfox.org/mozilla-central/source/mobile/android/chrome/content/browser.js#1178
Rank: 1
Picking this up bc all other bugs in the sprint are assigned/blocked.
Assignee: nobody → liuche
Iteration: --- → 1.29
Priority: P2 → P1
Spoke IRL, I'm taking this over.
Assignee: liuche → michael.l.comella
Nate, do you happen to know if there is a standard for referrer uris in Android intent URIs (i.e. opening another Android app via a link)? For example, if a user clicks a Pocket top story that links to Medium and the user has the Medium app installed, we'd open in the Medium app. However, I'm not sure how we'd pass in the referrer URI.
Flags: needinfo?(nate)
FYI: I added bug 1395409 to write a test for this.
Comment on attachment 8902957 [details]
Bug 1393699: Rm unused BrowserApp.openUrlAndStopEditing method.

https://reviewboard.mozilla.org/r/174714/#review179794
Attachment #8902957 - Flags: review?(liuche) → review+
Comment on attachment 8902958 [details]
Bug 1393699: Add referrerURI to Tabs.loadUrl flows.

https://reviewboard.mozilla.org/r/174716/#review179796

Glad this is a simple fix to just add a referer field. It's not super scalable, but this isn't actually used in many places so that should be okay.
Attachment #8902958 - Flags: review?(liuche) → review+
Comment on attachment 8902959 [details]
Bug 1393699: Add Pocket referrer URI to AS top story clicks.

https://reviewboard.mozilla.org/r/174718/#review179802

I wonder if there's anything we need to follow up with Pocket about, to make sure they see increased metrics through their referer id being used on Android?

I'm glad this solution uses Gecko's existing functionality for the referer header! Much cleaner than a redirect :)
Attachment #8902959 - Flags: review?(liuche) → review+
Follow-up TODO (maybe split into separate bugs):
- via Chenxia: find out if we need to follow up with Pocket, to make sure they see increased metrics through their referer id being used on Android?
- Android intent URIs
- Test for referrer (bug 1395409)
Pushed by michael.l.comella@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4eb5a8e5cb5d
Rm unused BrowserApp.openUrlAndStopEditing method. r=liuche
https://hg.mozilla.org/integration/autoland/rev/f9bcc1e12a01
Add referrerURI to Tabs.loadUrl flows. r=liuche
https://hg.mozilla.org/integration/autoland/rev/8a87c00279d7
Add Pocket referrer URI to AS top story clicks. r=liuche
NI self comment 11.
Flags: needinfo?(michael.l.comella)
(In reply to Michael Comella (:mcomella) from comment #3)
> Nate, do you happen to know if there is a standard for referrer uris in
> Android intent URIs (i.e. opening another Android app via a link)? For
> example, if a user clicks a Pocket top story that links to Medium and the
> user has the Medium app installed, we'd open in the Medium app. However, I'm
> not sure how we'd pass in the referrer URI.

Moved to bug 1396116.

(In reply to Michael Comella (:mcomella) from comment #11)
> Follow-up TODO (maybe split into separate bugs):
> - Android intent URIs

As per above, bug 1396116.

> - via Chenxia: find out if we need to follow up with Pocket, to make sure
> they see increased metrics through their referer id being used on Android?

bug 1396124.
Flags: needinfo?(nate)
Flags: needinfo?(michael.l.comella)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: