Does tracking external source (?src=external-…) even work on AMO?

On addons.mozilla.org (AMO) on the statistics page (e.g. this one) it tells you, you track the source of a user/download of the add-on by appending ?src=external-[id] to the direct XPI download link or the add-on details page.

So I’ve been doing this for a while! However, it results in nearly no statistics.

As you can see on my public stats pages for my add-ons (here or here) the big majority of downloads are just accounted to “detail page”…

I have strong doubt these statistics are accurate. I mean, how do people get to the details page, if not following a link? Sure, there may be people sharing/recommending the add-on, but I still think the majority would click on a “tracking” link I’ve added an external src
For instance for this add-on, I know many people came from Twitter tweets I shared at the time of the big spike you see (which corresponds to the Firefox 67 release), however external-twitter has nearly no hits!

The way this currently works, it seems to be quite useless. :thinking:
Is this a bug or what happens here?

Hmm, when I first land on the details page, the install button link has:

path/to/extension.xpi?src=external-test

If I go into Reviews and then click the extension name to return to the details page – instead of using back – the install button link now has:

path/to/extension.xpi?src=dp-btn-primary

Install buttons on the Versions page exhibit the same change to ?src.

Unless the original src is saved in a cookie or local storage on the browser or server-side in the session, then it looks like any forward navigation from the details page breaks the tracking.

1 Like

Yes, interesting. I did indeed not consider that…

So here is a test link:

The same obviously happens for “internal” tracking links in the same way, i.e. mostly ?src=search.

However when you properly use the “back button” of the browser, it navigates back to the same URL.
That said, when you are on the reviews page e.g. and you click on the add-on name at the top left, it looses the “link”:
image

Another idea would be to just add the same tracking link to the add-on name links on these sub-pages. And that would likely be easier to implement.

Do you think I should open a bug report for this?

Sure! I think the download links (main button or version) should carry over the original src for some period of time (e.g., 2 hours), and a cookie, local storage, or session variable could be used to retain it.

Done: