matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.71k stars 2.62k forks source link

Transitions: reports about previous and following actions for each page URL #3332

Closed timo-bes closed 10 years ago

timo-bes commented 12 years ago

Awesome feature: Analytics Previous / next pages

For each page URL, this plugin reports the top X

The information is given in a popover which can be launched via a table action on the pages report.

mattab commented 12 years ago

Attachment: Example Transition Aug 22nd Transitions forum page.png

mattab commented 12 years ago

Attachment: Icon on hover could have colors and show a flow ? or something else, like a button and a text label ? Transitions open.png

mattab commented 12 years ago

Attachment: merged JS file showing errors firebug error.png

mattab commented 12 years ago

Attachment: too much data, direct entry is partly drawn.png

mattab commented 12 years ago

Attachment: Example blog post page with all previous-next types set.png

mattab commented 12 years ago

Attachment: Missing incoming traffic, does not sum to 61155 pageviews.png

mattab commented 12 years ago

Attachment: No data for URL.png

mattab commented 12 years ago

Attachment: Web Analytics Reports - piwik.org - Over 1 year - took 20s to generate.png

mattab commented 12 years ago

Attachment: missing direct entries.png

mattab commented 12 years ago

Attachment: 03.png

mattab commented 11 years ago

Attachment: unicode not displayed.png

mattab commented 11 years ago

Attachment: unicode URL displayed correctly in report.png

timo-bes commented 12 years ago

The plugin fakes an instance of Piwik_ArchiveProcessing_Day in order to use archiving code for live querying (later pre-archiving might be added). The plugin uses Piwik_ArchiveProcessing_Day::query*ByDimension. These methods have been extended in #3330.

From the returned data, only nb_actions is used in Transitions. In particular, count(distinct idvisit) and count(distinct idvisitor) is processed in MySQL and not used in the report. Count distinct takes significantly more time and memory than other aggregation functions. Should we extend the query*ByDimension methods to limit the columns in the result? The signatures are already rather long after #3330. I'm not sure what's best...

timo-bes commented 12 years ago

(In [6811]) refs #3332: Preparations for Transitions

timo-bes commented 12 years ago

(In [6812]) refs #3332 Transitions

timo-bes commented 12 years ago

(In [6813]) refs #3332: properties for previous commit

timo-bes commented 12 years ago

In case you're wondering: I can't commit properties from git svn. I have to commit with git svn, then update, propset & commit with svn. That's why I always set properties in a separate commit.

timo-bes commented 12 years ago

(In [6843]) refs #3332 row actions registry: preparations for Transitions UI

timo-bes commented 12 years ago

(In [6844]) refs #3332: Transitions UI (row action for pages report + popover)

timo-bes commented 12 years ago

(In [6845]) refs #3332 properties

timo-bes commented 12 years ago

So here's the current state of the Transitions UI. The plugin adds a new row action to the pages report which opens the Transitions popover.

It would be great if some of you could give it a try and report back to me. I'm especially interested in performance. How long does it take to load the popover on how many pageviews per day?

Please don't take too much time writing suggestions for the UI itself. We already have lots of changes planned. Once that's done and you still have suggestions, please let me know.

The icon that launches the popover is just a placeholder. I'd like to have an icon that looks a bit like the popover with curvy bars going in and out of a box. Unfortunately, everything I came up with didn't look good. Do we have someone who could design the icon?

timo-bes commented 12 years ago

(In [6846]) refs #3332 more work on Transitions

timo-bes commented 12 years ago

Even though we did URL normalization recently, we still have some problems with non-normalized URLs in this plugin. URLs with different domains or different strings after the hash have different idactions but end up in the same row in the pages report. This causes inconsistency because the numbers from the pages report and the ones derived on the basis of the idaction don't match. Since the Transitions report mixes both, that's bad.

One possible solution would be to add two options to the configuration:

When both these options are enabled, the problem should be gone. When enabling one of the options would break the links for a user, he can disable them. Honestly, I think most users wouldn't care very much about broken links. But with the options, it's up to them.

An alternative solution would be this: in order to avoid conflicting numbers from the pages report and the Transitions plugin's archiving, we don't reuse the pages report and have to get the main metrics from the logs. In particular, we're talking about #hits, #entries, #exits. it should be possible to get #hits by summing up the other numbers.

So what do you think? Which option's better? Are there other alternatives?

timo-bes commented 12 years ago

(In [6853]) refs #3332 Transitions

timo-bes commented 12 years ago

(In [6854]) refs #3332 updated expected test output for Transitions

timo-bes commented 12 years ago

(In [6855]) refs #3332

mattab commented 12 years ago

From the returned data, only nb_actions is used in Transitions. In particular, count(distinct idvisit) and count(distinct idvisitor) is processed in MySQL and not used in the report. Count distinct takes significantly more time and memory than other aggregation functions. Should we extend the query*ByDimension methods to limit the columns in the result? The signatures are already rather long after #3330. I'm not sure what's best...

If it's one more parameter and not too tricky, I'd say it's better to put it in. It might earn a few milliseconds here and there, which would tremendously help for pre-archiving (where milliseconds quickly make minutes ;))

So please add the parameter, and unit test, and all good. It's complicated but it has to be.

Even though we did URL normalization recently, we still have some problems with non-normalized URLs in this plugin. URLs with different domains or different strings after the hash have different idactions but end up in the same row in the pages report.

Hash tags: good point, I put a feature request in: #3232 - comment there if you have to add info.

Different domains: I think we can leave with this limitation for now. Users can use setCustomUrl in javascript to correct input URL if necessary... Later we could also implement a filter mechanism to modify input URLs and define rules in the piwik UI, but seems too edge case for now - UI and usability is IMHO more useful than perfect data!

timo-bes commented 12 years ago

Hash tags: good point, I put a feature request in: #3232 - comment there if you have to add info.

Not recording the hash part in the database by default (as you suggested in #3232) would help lots.

Thanks for creating such a lovely icon by the way - lol! Seriously, there must be someone who is good at this kind of thing and can design an icon for us.

Also, why are my commits not showing up in the ticket anymore? I made four today referring this ticket and none are shown here.

timo-bes commented 12 years ago

Replying to matts E-Mail:

Popover Title: could have a one line title such as "Transitions for /blog/hello-world... - April 15th 2012" indicating 2 important elements: date, and the page we are looking at.. would add real value without using more pixels, always appreciated.

The popover already conatins a lot of text and the title would make it look really packed. Also the title is way too big compared to the other text in the popover. Imho it looks quite ugly. Besides, the page we are looking at is already indicated in the center box.

So I'd rather not set the title. OK?

timo-bes commented 12 years ago

(In []) refs #3332

sgiehl commented 12 years ago

(In [6868]) refs #3332, refs #3227 fixed possible fatal if no row is available for page metrics; do not run transition tests by default; ensure that all plugins are loaded before integration tests

mattab commented 12 years ago

Timo, WOOW! Excellent feature, awesome potential and I really like the first implementation you made!

Here is my feedback regarding the User Interface.

It took 3-4 seconds max (often 1s) to load for the homepage with 1500 pageviews. It is definitely super responsive ons mall websites, very nice speed! Benefits of RankingQuery and URL normalization are huge.

Very well done.. :-) impressed by your work & the performance side of it.

Here is full review of using the feature review & making it more accessible:

Other review:

More reviews to come later

mattab commented 12 years ago

(In [6987]) Removing temporarily Transitions plugin from release Refs #3332

on the demo, when enabling the plugin, it was creating a JS error in the merged JS file

mattab commented 12 years ago

(In [6988]) Removing temporarily Transitions plugin from release Refs #3332

timo-bes commented 12 years ago

Some general comments about the reviews (also the ones received via e-mail)

timo-bes commented 12 years ago

(In [7032]) refs #3332 adding Transitions again

timo-bes commented 12 years ago

(In [7033]) refs #3332 highlighting groups on hover in Transitions

timo-bes commented 12 years ago

After the last commit, when you hover a goup title, it highlights the metric in the center. Also, the group is highlighted when you hover the metric in the center box. This makes the mapping between the groups and the center box easier.

timo-bes commented 12 years ago

(In [7035]) refs #3332 nicer loading message for transitions, introducing a general popover helper

mattab commented 12 years ago

(In [7037]) will release 1.9 B to test transitions on demo and bring back Row evolution on demo Refs #3332

mattab commented 12 years ago

When Transitions is enabled, the Merged Javascript file returns the error:

SyntaxError: missing } after property list
index.php?module=Proxy&action=getJs&cb=0703c62885101c6797656014692f23aa
Line 1122

See attached screenshot showing error in firebug.

mattab commented 12 years ago

Wow very cool changes! They make a big difference indeed :)

I think we should use a redirect proxy to hide the current URL from the HTTP referrer. As far as I can see, that doesn't exist so far. Right?

Yes it's there, you can use: href="?module=Proxy&action=redirect&url='.urlencode($URL)

After the last commit, when you hover a goup title, it highlights the metric in the center. Also, the group is highlighted when you hover the metric in the center box. This makes the mapping between the groups and the center box easier.

Very nice indeed!

Some feedback after testing this feature for 1 hour:

Transitions is such a great feature!! :)

timo-bes commented 12 years ago

(In [7043]) refs #3332 fixing JS error in merged file

timo-bes commented 12 years ago

(In [7045]) refs #3332 Transitions remembers the popover state in a second hash part of the URL => using direct links and the browser history is possible now!

timo-bes commented 12 years ago

(In [7046]) refs #3332 Transitions: main url, external referrers, outlinks and downloads open in new tab on click

timo-bes commented 12 years ago
  • Tooltip for a given previous/next page, on hover on left/right percentages, says: "22 of 45 from search engine", could you slightly clarify and write "$URL \n 22 visits (out of 45 visits) from search engines"

I played a bit with that idea and decided to do only a minor change

  • currently the orange is displayed/highlighted when the label is hovered. Could you also color in orange, when the mouse hovers on the blue/green curbs on left/right of central box? It will really improve usability as it's natural for me to hover on the curb (ie. closer to central box) rather than the actual group's label

Unfortunately, that's a limitation of canvas: we can't attach events to the shapes. I know it would be nice but it's nearly impossible.

  • For example It would be very interesting to see for "piwik.org/latest.zip" which pages and keywords were used as previous interaction to the download!

It would be nice to have downloads, campaigns and external websites in the center. It's on my list but I won't do it for the first version.

  • Also it would really interest me as I'd like to show Transitions for Internal search keywords :)

It is planned to have internal search keywords on the left so you can see which searches lead to the page. Having internal searches in the center is interesting but that kind of info should be included in the internal search plugin.

timo-bes commented 12 years ago
  • small detail: when the box is hovered orange, it would be nice to show the + icon in orange as well (rather than blue)

Actually, I think it's good that it's blue because the orange background highlights the blue icon. If we make it orange on orange background, it's easier to miss it and expanding the groups is one of the coolest parts about the feature so I'd like to make it visible.

timo-bes commented 12 years ago

(In [7050]) refs #3332 Transitions:

timo-bes commented 12 years ago

Matt, in your screenshot the percentage labels on the curves sometimes had two lines (becuase you don't have Arial). Can you please check whether that's fixed now?

timo-bes commented 12 years ago

(In [7051]) refs #3332 Transitions: