Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #8060, fix bounce rate not appearing in legend or appearing incorrectly + some other bugs. #8171

Merged
merged 9 commits into from Jun 23, 2015

Conversation

diosmosis
Copy link
Member

As title.

Use bounce_rate metric directly in visitor map instead of… calculating using bounce_count (which has to manually requested), and correctly format bounce_rate values in the legend. Also, use avg_time_on_site metric directly, and format in JS properly.

Also includes a bug fix in Request.php: if format_metrics=0 is supplied, it will be overwritten to format_metrics=bc, because if (empty($request['format_metrics'])) is used, instead of isset.

To use unformatted (but computed) processed metrics in the visitor map, the code now formats the code itself in JS, at least for bounce_rate + avg_time_on_site. Bounce rate must be multiplied by 100. Average time on site just has to convert to a time string when being displayed.

Best to review commit by commit, paying attention to commit messages.

… calculating using bounce_count (which has to manually requested), and correctly format bounce_rate values in the legend. Bounce rate values must be converted to ints immediately after loading, since API.getProcessedReport will always format percents, and UserCountryMap uses them as if they are integers.
@diosmosis diosmosis added the Bug For errors / faults / flaws / inconsistencies etc. label Jun 22, 2015
@diosmosis diosmosis self-assigned this Jun 22, 2015
@diosmosis diosmosis added this to the 2.14.0 milestone Jun 22, 2015
diosmosis added 4 commits June 22, 2015 02:33
…s if showRawMetrics is true. And correctly fdisplay and format avg_time_on_site using processed metric value, instead of recalculating in visitor map.
… will always revert to format_metrics=bc, since empty($request['format_metrics']) is used.
…ied to API.getProcessedReport. If not supplied, provide inconsistent but backwards compatible behavior.
…means getting numeric values from Piwik and formatting in JS, instead of getting intermediate metrics, calculating numeric metrics and then formatting in JS.
@diosmosis diosmosis changed the title Refs #8060, fix bounce rate not appearing in legend or appearing incorrectly. Refs #8060, fix bounce rate not appearing in legend or appearing incorrectly + some other bugs. Jun 22, 2015
@diosmosis
Copy link
Member Author

Turned into a bigger PR than I anticipated, @mattab please review. BC should be maintained.

@mattab
Copy link
Member

mattab commented Jun 22, 2015

@diosmosis could you add a UI test showing the bounce rate legend on the map?

@mattab
Copy link
Member

mattab commented Jun 23, 2015

Looks good to me to merge after two UI tests added (one for bounce rate, one for average time on site) 👍

diosmosis added a commit that referenced this pull request Jun 23, 2015
Refs #8060, fix bounce rate not appearing in legend or appearing incorrectly + some other bugs.
@diosmosis diosmosis merged commit 8e2275d into master Jun 23, 2015
@diosmosis diosmosis deleted the bounce_rate_map_fix branch June 23, 2015 09:30
diosmosis pushed a commit that referenced this pull request Jun 23, 2015
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jun 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants