Closed Bug 1705242 Opened 3 years ago Closed 3 years ago

Add ability to promote Pontoon Add-On in the extension

Categories

(Webtools Graveyard :: Pontoon, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: mstanke)

References

()

Details

(Whiteboard: pontoon-addon-promotion)

Attachments

(1 file, 1 obsolete file)

We'd like to promote the Pontoon Add-On to users of Pontoon in order to increase notification visibility.

Here's how it'll work:

When a registered user visits any Pontoon page, we'll search for a hook set by the Add-On to check if the Add-On is installed. If the hook isn't present and the promotional message hasn't been dismissed yet (as identified by the “dismissed” flag in the user profile), we'll display the message with a link to install the Add-On and a button to dismiss the notice.

This bug tracks the implementation of the logic on the Add-on side, that will allow Pontoon to detect if the Add-on has been installed. We’ll only target users of Firefox for now, and might add support for Chrome Add-On in a followup.

Hi Matjaž.

I am very interested in promotion of the Pontoon Add-on and willing to do the necessary changes in the codebase of the extension.

Adding a "hook": What type of hook would you prefer? Should it be a meta tag in the <head>, or a boolean flag on the window JS object? AFAIK both (and possible more) is doable with content scripts. The most complex part should be, but still easy, to tweak the right moment to inject the content script (run_at) that will create the hook, so it's available for the Pontoon frontend without any unnecessary delay.

Support in browsers: As for support in browsers, I managed to make releases to Chrome Web Store work again, so it will be actually less work not to focus on a particular browser. :) But I can make it Firefox-only for now if you want.

Campaign tracking: Though not for all links to Pontoon, Pontoon Add-on currently adds utm_source to the URL, so you can track it via analytics. It might be a good moment to tweak this now, but it's probably a stretch goal.

Let's arrange a sync about these via email or chat.

Michal, thanks for stepping up to help with that!

I wonder if we could use window.postMessage() instead of a hook, which should solve the problems with the delay and finding the right moment. I assume it would also make it easier to dismiss the promotional message right after the Add-on is installed and the user still has the Pontoon tab open (and show "Thanks for installing Pontoon Add-On" message).

Regarding the browsers: sure, let's kill two birds with one stone then. :)

It's also good to know about the utm_source. In particular we'd like to track the number of clicks on the “Mark all Notifications as read” link in the add-on.

I wasn't aware of such APIs. I will reserve some time on Sunday to inspect it and create a test version of Pontoon Add-on, that would "expose itself" to Pontoon in various ways, so you can compare which suits you the best.

I opened a PR for Pontoon Add-on. Beside window.postMessage (which covers the case when the extension is installed and a Pontoon tab is already open), I added custom information to window.PontoonAddon to expose the information for any newly open tab as well.

To preview how that works together, download the artifacts from build.yml check, unzip it and load the Mozilla package via about:debugging. It's still WIP and works on pontoon.mozilla.org only for now. It should work for any Pontoon server you configure in the Pontoon Add-on options, including localhost.

As for utm_source, I found in the code there are two values being added already. utm_source=pontoon-addon is added to the URL when a tab is open from the extensions (these you should be able to see in Google Analytics already), and ?utm_source=pontoon-addon-automation is added for any request made on background by the extension, like marking notifications as read (but not available in Google Analytics). I don't know if this is valid use of the utm_ query params, but it should serve the purpose.

Thanks for the patch! Let's continue the discussion on GH.

As for the utm_source, that's great. I can confirm the add-on already does what we need here.

Attached file GitHub Pull Request (obsolete) —
Assignee: nobody → m
Assignee: m → mstanke
Status: NEW → ASSIGNED
Summary: Promote Pontoon Add-On → Add ability to promote Pontoon Add-On in the extension
Blocks: 1706959

Pontoon Add-on 4.2.0 with the hooks is now available from AMO. In Chrome Web Store it's awaiting review.

Attached file GitHub Pull Request
Attachment #9217728 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: