Closed Bug 1182210 Opened 10 years ago Closed 10 years ago

Store one short URL from Bitly for every document in database

Categories

(developer.mozilla.org Graveyard :: Performance, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jezdez, Assigned: robhudson)

References

Details

(Keywords: in-triage, Whiteboard: [specification][type:change])

What feature should be changed? Please provide the URL of the feature if possible. ================================================================================== We currently use a bitly URL for every document for the share links feature but request that URL on demand as well as three times with different GET parameters. This should instead be stored during render time, possibly as a celery task so this is unblocked from Bitly's API time. What problems would this solve? =============================== This would reduce the interaction with a 3rd party API to a minimum. Who would use this? =================== n/a What would users see? ===================== n/a What would users do? What would happen as a result? =================================================== n/a Is there anything else we should know? ======================================
Blocks: 1177264
Component: General → Performance
Assignee: nobody → jezdez
Status: NEW → ASSIGNED
:hoosteeno :groovecoder To make sure I'm on the right track, it's okay for us from the GA perspective to drop the utm_source parameters that are different in the three uses of the bitly in the shared links rendering? Instead I'd like to just use one source for each document's short URL, in a db table field. https://github.com/mozilla/kuma/blob/0a3f1f984f6872669039ae5239180cedbf3dfd6b/kuma/wiki/templates/wiki/includes/document_macros.html#L210-L212
Flags: needinfo?(lcrouch)
Flags: needinfo?(hoosteeno)
We will lose the ability to back-track which services' shares are providing us the most benefit but since that's not in the requirements on bug 875062 I think that's okay. Sounds like you were also discussing this with :hoosteeno :groovecoder so I will leave the needs info for them to chime in.
302 :garethc ... Gareth - I couldn't find a quick answer to this. If we create tracking urls with utm_campaign and utm_medium, but **without** a utm_source parameter, will GA fill in the source based on the referring domain as it does for non-campaign traffic?
Flags: needinfo?(lcrouch) → needinfo?(garethcull.bugs)
Hey Luke, utm_medium and utm_source need to be set together, else the traffic will look like direct and not set. See this example url: https://www.mozilla.org/en-US/?utm_source=test&utm_campaign=test-campaign&luke=cool Going into real-time and Filtering on luke=cool...you'll notice that utm_source and medium do not get set properly: http://cl.ly/image/0k162g3v3l3J Unfortunately, source and medium need to be set together. Hope this helps! Gareth
Flags: needinfo?(garethcull.bugs)
Thanks :garethc. needinfo? myself to check with bitly if they will preserve a utm_source parameter if we append it to the short url in the jinja template.
Flags: needinfo?(lcrouch)
UPDATE: bitly is going to charge us (again) for an additional premium feature to preserve utm parameters thru short-links. :hoosteeno can confirm - we're going to skip the short-links and use long links at first.
Flags: needinfo?(lcrouch)
Here's what short links get us: 1) A nice short link at http://mzl.la... 2) Another analytics dashboard about link activity We only care about #1, and as near as I can tell it's really just a vanity feature without much functional impact. We don't care about it enough to pay the ongoing rate that bit.ly proposes. So let's use long links and launch the feature.
Flags: needinfo?(hoosteeno)
In that case, I'm removing this from the bug tree of both the feature and the performance sprint. I'll add a new bug to remove the short links to block the feature.
No longer blocks: 1145630, 1177264
Bitly has turned on a flag that will allow parameters on a shortlink to pass directly through to MDN. That means we can store one short link for every article, and then at page render time we can add utm parameters to the link. Example: * if mzl.la/lorem_ipsum is a shortlink to developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array * then mzl.la/lorem_ipsum?utm_source=hoosteeno.com is a shortlink to developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array?utm_source=hoosteeno.com So this bug is now about storing one shortlink in the database per article.
Summary: Store short URLs from Bitly for every document in database → Store one short URLs from Bitly for every document in database
Summary: Store one short URLs from Bitly for every document in database → Store one short URL from Bitly for every document in database
:jezdez - did you have a branch around somewhere that moves this logic into a celery task? I might try to pick it back up now that we have the right bitly feature.
Flags: needinfo?(jezdez)
Ah, I didn't have a branch, this was one of the tickets I filed while I was in the area of the code but didn't have time to do right away. Pick up as you like, :robhudson also just asked.
Flags: needinfo?(jezdez)
Assignee: jezdez → robhudson.mozbugs
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/12fec494d546429df7c053cef3eb6ff58d9e9482 fix bug 1182210 - Store bitly URLs on model https://github.com/mozilla/kuma/commit/4a74dafd007531b1a10b5bb0741cacfedb7327c2 Merge pull request #3505 from robhudson/1182210-bitly fix bug 1182210 - Store bitly URLs on model
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/737a868d090fc43082d75335b3d73ef92a21561f Bug 1182210 - Update share links to only trigger tasks once per page https://github.com/mozilla/kuma/commit/f2987375afe08a677dc3afd8f2b9de68991f5e95 Merge pull request #3524 from mozilla/share-links Bug 1182210 - Update share links to only trigger tasks once per page
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/45bd43e0808f32286220631d8e11c5d0789a84e3 Bug 1182210 - Use full URLs for sharing https://github.com/mozilla/kuma/commit/ec53e4b7848c59b7edeb11fbf783205c8177af5a Merge pull request #3560 from mozilla/full-url-sharing Bug 1182210 - Use full URLs for sharing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.