2020-07-14 16:52:26 +03:00
|
|
|
import React from 'react';
|
|
|
|
|
2021-07-21 16:50:26 +03:00
|
|
|
import StickyNav from './pinned-header-hoc';
|
2020-07-14 16:52:26 +03:00
|
|
|
import CurrentVisitors from './stats/current-visitors'
|
|
|
|
import VisitorGraph from './stats/visitor-graph'
|
2020-08-17 15:13:30 +03:00
|
|
|
import Sources from './stats/sources'
|
Adds entry and exit pages to Top Pages module (#712)
* Initial Pass
* Adds support for page visits counting by referrer
* Includes goal selection in entry and exit computation
* Adds goal-based entry and exit page stats, formatting, code cleanup
* Changelog
* Format
* Exit rate, visit duration, updated tests
* I keep forgetting to format :/
* Tests, last time
* Fixes double counting, exit rate >100%, relevant tests
* Fixes exit pages on filter and goal states
* Adds entry and exit filters, fixes various bugs
* Fixes discussed issues
* Format
* Fixes impossible case in tests
Originally, there were only 2 pageviews for `test-site.com`,`/` on `2019-01-01`, but that doesn't make sense when there were 3 sessions that exited on the same site/date.
* Format
* Removes boolean function parameter in favor of separate function
* Adds support for queries that use `page` filter as `entry-page`
* Format
* Makes loader/title interaction in sources report consistent
2021-02-26 12:02:37 +03:00
|
|
|
import Pages from './stats/pages/'
|
2020-07-14 16:52:26 +03:00
|
|
|
import Countries from './stats/countries'
|
|
|
|
import Devices from './stats/devices'
|
|
|
|
import Conversions from './stats/conversions'
|
|
|
|
|
2021-07-21 16:50:26 +03:00
|
|
|
export default class Realtime extends React.Component {
|
2020-07-14 16:52:26 +03:00
|
|
|
renderConversions() {
|
|
|
|
if (this.props.site.hasGoals) {
|
|
|
|
return (
|
2021-03-16 11:40:25 +03:00
|
|
|
<div className="items-start justify-between block w-full mt-6 md:flex">
|
2020-07-14 16:52:26 +03:00
|
|
|
<Conversions site={this.props.site} query={this.props.query} title="Goal Conversions (last 30 min)" />
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2021-03-16 11:40:25 +03:00
|
|
|
const navClass = this.props.site.embedded ? 'relative' : 'sticky'
|
|
|
|
|
2020-07-14 16:52:26 +03:00
|
|
|
return (
|
|
|
|
<div className="mb-12">
|
2021-07-21 16:50:26 +03:00
|
|
|
<StickyNav site={this.props.site} query={this.props.query} timer={this.props.timer} />
|
2020-07-14 16:52:26 +03:00
|
|
|
<VisitorGraph site={this.props.site} query={this.props.query} timer={this.props.timer} />
|
2021-03-16 11:40:25 +03:00
|
|
|
<div className="items-start justify-between block w-full md:flex">
|
2020-08-17 15:13:30 +03:00
|
|
|
<Sources site={this.props.site} query={this.props.query} timer={this.props.timer} />
|
2020-07-14 16:52:26 +03:00
|
|
|
<Pages site={this.props.site} query={this.props.query} timer={this.props.timer} />
|
|
|
|
</div>
|
2021-03-16 11:40:25 +03:00
|
|
|
<div className="items-start justify-between block w-full md:flex">
|
2020-07-14 16:52:26 +03:00
|
|
|
<Countries site={this.props.site} query={this.props.query} timer={this.props.timer} />
|
|
|
|
<Devices site={this.props.site} query={this.props.query} timer={this.props.timer} />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{ this.renderConversions() }
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|