Skip to content

Always show direct traffic in sources reports - #2531

Merged
vinibrsl merged 4 commits into
masterfrom
always-show-direct-traffic
Dec 19, 2022
Merged

Always show direct traffic in sources reports#2531
vinibrsl merged 4 commits into
masterfrom
always-show-direct-traffic

Conversation

@ukutaht

@ukutaht ukutaht commented Dec 19, 2022

Copy link
Copy Markdown
Contributor

Removes query param show_noref which was used from React to control whether to show Direct / None traffic or not. The show_noref behaviour was untested previously.

The main visual change is that we used to not show Direct / None in sources list by default. It would only be shown when you clicked on 'details'. Now it's always shown:

Screenshot 2022-12-19 at 14 00 06

Closes #2523

Changes

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

Removes query param show_noref which was used from React to control
whether to show Direct / None traffic or not. The show_noref behaviour
was untested previously.

Closes #2523
@bundlemon

bundlemon Bot commented Dec 19, 2022

Copy link
Copy Markdown

BundleMon

Files updated (1)
Status Path Size Limits
static/js/dashboard.js
297.95KB (-41B -0.01%) -
Unchanged files (6)
Status Path Size Limits
static/css/app.css
515.19KB -
static/js/app.js
12.13KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.06KB -
tracker/js/plausible.js
748B -
static/js/applyTheme.js
314B -

Total files change -41B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

const detailed = this.showExtra()
api.get(`/api/stats/${encodeURIComponent(site.domain)}/${this.currentFilter()}`, query, {limit: 100, page, detailed, show_noref: true})
.then((res) => this.setState({loading: false, sources: sources.concat(res), moreResultsAvailable: res.length === 100}))
api.get(`/api/stats/${encodeURIComponent(site.domain)}/${this.currentFilter()}`, query, { limit: 100, page, detailed })

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the editor auto-formatted this file. Here's the real change.

fetchReferrers() {
if (this.props.query.filters.source) {
api.get(`/api/stats/${encodeURIComponent(this.props.site.domain)}/referrers/${encodeURIComponent(this.props.query.filters.source)}`, this.props.query, {show_noref: this.showNoRef()})
api.get(`/api/stats/${encodeURIComponent(this.props.site.domain)}/referrers/${encodeURIComponent(this.props.query.filters.source)}`, this.props.query)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Real change

@vinibrsl
vinibrsl merged commit a37b343 into master Dec 19, 2022
@vinibrsl
vinibrsl deleted the always-show-direct-traffic branch December 19, 2022 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Direct traffic missing from exported stats

2 participants