@diosmosis opened this Pull Request on June 22nd 2015 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.

@diosmosis commented on June 22nd 2015 Member

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

@mattab commented on June 22nd 2015 Owner

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

@mattab commented on June 23rd 2015 Owner

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

This Pull Request was closed on June 23rd 2015
Powered by GitHub Issue Mirror