Commit Graph

421 Commits

Author SHA1 Message Date
David Janda
b6349df475
Display pageviews in details modal for top pages when filtering by a source (#2585) 2023-01-13 14:10:20 -03:00
Adam Rutkowski
4bde884da8
Self-host Sentry user feedback script (#2579)
* Add static, minified sentry bundle

OG source: https://browser.sentry-cdn.com/5.9.1/bundle.min.js

* On 500s, load our self-hosted sentry bundle
2023-01-10 16:51:46 +02:00
David Janda
f949278d39
Convert list elements to button elements for stats tabs in order to enable keyboard navigation (#2526) 2023-01-05 11:45:19 +02:00
RobertJoonas
47e21121db
Realtime dashboard improvements (#2445)
* add a new realtime-update-timer module

* hook to the new 'tick' event in ListReport for auto-updates

This commit fixes the bug where all reports using the `ListReport` component did not
auto-update in realtime mode. Those reports are:

- Pages (Top / Entry / Exit)
- Locations (Countries / Regions / Cities)
- Devices (Screen Sizes / Browsers + versions / OS-s + versions)

* fetch data for ListReports only when scrolled into view

* refactor fetching data in ListReport

* refer to one source of truth for utm tags

* make the 'All' tab in Sources auto-update

* make all UTM tabs in Sources auto-update

* fetch UTM data only when scrolled into view

* auto-update Referrers with the new timer

* auto-update google search terms

* auto-update Conversions

* make countries map auto-update

* auto-update visitor-graph and top stats with new timer

* use new tick event for current visitors (in Historical)

* remove the old timer class

* update changelog

* Visual improvements to automatic realtime updates (#2532)

* minor consistency fix for text color in dark mode

* use FlipMove in goal conversions report

* use FlipMove in ListReports

* set main graph and top stats loading state correctly

* refactor isIntervalValid function

* enforce intervals are valid when set and stored

* remove duplicate data fetching on interval change

Fetching new data is handled by the `fetchGraphData` callback in `updateInterval`

* refactor updateMetric function

* make it clearer why 'metric' can be a faulty value

* extract 'query' and 'site' variables from 'this.props'

* reset interval state only when period is changed

The 'maybeRollbackInterval' function was also used to fetch data. This commit replaces
all those function calls with 'fetchGraphData' which better describes the actual behavior.
We should only worry about rolling back the interval if 'query.period' has changed.

This commit also stops the graph from flickering when it is updated in realtime.

* update names of two variables

* remove unnecessary negation

* make collapsed graph state more explicit

* consider stored invalid intervals when graph mounts

* fix not showing loading spinner regression

* remove interval state from VisitorGraph (#2540)

* Realtime prop breakdown (#2535)

* disable load more in realtime mode

* extract doFetch function

* separate fetchPropBreakdown and fetchNextPage functions

* subscribe for auto-updates in realtime

* improve readability with function name changes
2023-01-02 17:42:57 +02:00
Uku Taht
a37b3433d7
Always show direct traffic in sources reports (#2531)
* Remove show_noref behaviour

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

* Add changelog entry

* Fix tests

* Removed files I did not mean to check in :)
2022-12-19 13:40:21 +01:00
Uku Taht
8f20bf0ab2
Add metric ID to HTML (#2518) 2022-12-19 12:21:15 +01:00
Vini Brasil
90786cb3bc
Remove intervals feature flag (#2474)
This commit removes the intervals feature flag, as this feature has
already been released to 100% of the users.
2022-11-29 10:12:36 -03:00
Vini Brasil
e2563acf36
Standardise dropdown icon margins (#2473) 2022-11-25 09:12:52 -03:00
Vini Brasil
ffbfb14714
Pass interval param to CSV export (#2469)
This commit adds the interval param to the CSV export client-side
request.
2022-11-25 10:53:22 +02:00
Vini Brasil
32a38fac7a
Add keyboard navigation to intervals (#2470)
* Create function to handle keybindings

* Add <i> keybinding to intervals
2022-11-25 10:51:43 +02:00
Vignesh Joglekar
497a52c10a
Add support for intervals (#1574)
Co-authored-by: Vini Brasil <vini@hey.com>
Co-authored-by: Vignesh Joglekar <hey@vigneshjoglekar.com>
2022-11-22 09:50:58 -03:00
Adam Rutkowski
e522a2d7c1
Stop relying on npm-bin (hard deprecated) (#2446) 2022-11-16 16:35:08 +02:00
Vini Brasil
bea227d71b
Clean graph JavaScript code (#2441)
This commit lints JavaScript files, removes commented-out code, and
moves 3 constants to `graph-util.js`. This is part of the Intervals
work, in order to make the original pull request smaller and release
this feature incrementally.

Related: #1574

Co-authored-by: Vignesh Joglekar <hey@vigneshjoglekar.com>
2022-11-15 11:38:39 -03:00
dependabot[bot]
0e91ae9b58
Bump loader-utils from 1.4.0 to 1.4.1 in /assets (#2423)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-10 08:34:04 -03:00
Vinicius Brasil
b2047d8975
Show 0% difference instead of N/A (#2401)
Closes #2397
2022-10-28 11:21:07 -03:00
Adam Rutkowski
0fa6b688af
Google APIs integration improvements (#2358)
* Make TestUtils module available in all tests

* Add macros patching the application env in tests

Unfortunately a lot of existing functionality relies on
certain application env setup. This isn't ideal because
the app config is a shared state that prevents us from
running the tests in parallel.

Those macros encapsulate setting up new env for test purposes
and make sure the changes are reverted when the test finishes.

* Allow passing request opts to HTTPClient.post/4

We need this to swap custom request building in
Google Analytics import.

* Unify errors when listing sites

* React: propagate backend error messages if available

* React: catch API errors in Search Terms component

* Propagate google API errors on referrer drilldown

* Handle verified properties errors in SC settings

* Add missing tests for SC settings controller

* Unify errors for fetching search analytics queries (list stats)

* Unify errors refreshing Google Auth Token

* Test fetch_stats/3 errors and replace Double with Mox

* Fixup makrup

* s/class/className

* Simplify Search Terms display in case of errors

* Fix warnings
2022-10-24 09:34:02 +02:00
Uku Taht
0bc762bfdc
Fix svg favicons (#2295)
* Overrides content-type for SVG favicons

* Organize favicon rendering

Make sure the placeholder icon is always requested from
/favicon/sources/placeholder

* Run prettier on site-switcher.js

* Yak Shave: upgrade Heroicons to 2.0

* Use HeroIcons instead of custom svg

* Update lib/plausible_web/plugs/favicon.ex

Co-authored-by: Adam Rutkowski <hq@mtod.org>

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2022-10-04 13:20:51 +03:00
dependabot[bot]
0f7f82f789
Bump bundlemon from 1.2.0 to 1.4.0 in /assets (#2251)
Bumps [bundlemon](https://github.com/LironEr/bundlemon) from 1.2.0 to 1.4.0.
- [Release notes](https://github.com/LironEr/bundlemon/releases)
- [Commits](https://github.com/LironEr/bundlemon/compare/bundlemon@v1.2.0...bundlemon@1.4.0)

---
updated-dependencies:
- dependency-name: bundlemon
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-23 12:16:48 -03:00
dependabot[bot]
2073d5edb0
Bump eslint-plugin-import from 2.22.1 to 2.26.0 in /assets (#2240)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.22.1 to 2.26.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.22.1...v2.26.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 19:06:43 -03:00
Uku Taht
be1b72895d Use React.ref.current() 2022-09-15 12:57:20 +03:00
Uku Taht
ad39640475 Fix tooltip boundary ref 2022-09-15 12:54:43 +03:00
Uku Taht
8d8b66d266
Add boundary to tooltip (#2211) 2022-09-13 12:46:01 +03:00
Uku Taht
aa7d7a35bd Revert "Add link to UTM builder (#2195)"
This reverts commit 6e7873f834.
2022-09-09 10:25:21 +03:00
Uku Taht
6e7873f834
Add link to UTM builder (#2195)
* Add link to UTM builder

* Changelog entry
2022-09-08 21:02:40 +03:00
Adam Rutkowski
cff666e6ba
Update browserlist-db (#2192) 2022-09-07 09:31:46 -07:00
Uku Taht
7683638b84
Embed improvements (#2148)
* Replace current tooltip with Popper.js

* Merge tooltip and title for top stats

* Format bounce rate and visit duration numbers in tooltip

* Add 'width=manual' mode for embed

* Add changelog entry

* Use helper function canMetricBeGraphed
2022-09-01 11:22:04 +03:00
Baoshuo
eac4660354
Update links to documents 2022-08-15 09:20:40 +08:00
Vinicius Brasil
2d7dee7067
Fix 24-hour clock format for some locales (#2074)
This commit fixes a commit when the 24-hour clock was displayed like
`09 Uhr:00` or `06 h:00` for some locales. It keeps appending the `:00`
string but removes any non-numeric characters first.
2022-08-01 11:35:49 +03:00
Uku Taht
446b6e64b8 Change 12h time format from '12h' to '12:00' 2022-07-28 17:19:30 +03:00
Uku Taht
fc63d036e2 Use empty string in favour of regex in String.replace 2022-07-28 17:10:57 +03:00
Uku Taht
a84da82b97 Formats the graph-util file 2022-07-28 17:10:30 +03:00
Sasha Fonseca
bbe3caba6a
Show time format of graphs based on browser's language (#2048)
* Show time format of graphs based on browser's language

* Use Intl.DateTimeFormat for graph time axis
2022-07-28 17:07:07 +03:00
Vinicius Brasil
ba36b08fd6
Make realtime goal conversions clickable (#2035)
Closes #1739
2022-07-21 14:00:42 +03:00
dependabot[bot]
ec78c7b80c
Bump terser from 5.7.0 to 5.14.2 in /assets (#2036)
Bumps [terser](https://github.com/terser/terser) from 5.7.0 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 13:58:07 +03:00
Daniel Bonfim
fbadad73fd
Closes #1994 (#2012) 2022-07-18 10:13:50 +03:00
Uku Taht
93b84661d1 Add tooltip to source numbers 2022-07-14 12:27:40 +03:00
Sasha Fonseca
37dddb62d9
Add tooltip to show exact number in lists (#2009)
* Add tooltip to show exact number in lists

* Update CHANGELOG
2022-07-12 23:47:14 +03:00
Vignesh Joglekar
9279cd7554
Fixes inane Safari Date.parse compatibility issue (#1887)
* Safari is modern IE

* Adds proper support for realtime "dateString"
2022-06-06 10:41:27 +03:00
Vignesh Joglekar
e82131b2f3
Fixes edge case on conversion metric automatic change (#1939) 2022-06-01 10:32:00 +03:00
Uku Taht
47fc09bacf Add version file directly to priv 2022-05-27 11:19:37 +03:00
Uku Taht
46ee1ba012 CI 2022-05-03 15:47:08 +03:00
Uku Taht
eeaefc1ad0 Only show db-ip notice when relevant 2022-05-03 10:38:59 +03:00
Uku Taht
b7bfa3ea75 Remove CSS conflict with modal 2022-04-26 10:24:03 +03:00
Uku Taht
f6f78cf418 Stop content shifting on page 2022-04-26 10:12:10 +03:00
Vignesh Joglekar
b686d8bff9
Re-adds underline to selected top stat (#1849) 2022-04-25 10:57:56 +03:00
Bhavin Gandhi
d1beb83525
Set license to AGPL-3.0-or-later for assets package (#1852)
As the whole project is AGPL v3 licensed, this just reflects that in
the package.json. This is not changing the tracker JS license.

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2022-04-25 10:43:22 +03:00
Vignesh Joglekar
52348f7a7c
Reworks tooltip hierarchy (#1846) 2022-04-22 12:01:04 +03:00
Uku Taht
428ee747c3 Hook up flags to the custom prop filter 2022-04-21 16:43:16 +03:00
Uku Taht
c7742ec179 Display negated prop filter correctly 2022-04-21 11:51:51 +03:00
RobertJoonas
40275b64d4
Pageview custom dimensions (#1816)
* added custom dimension filtering tests for pages

* first filter UI in place

* pages, entry pages and exit pages can be filtered by pageview props

* added tests for expected filtering behaviour

* fix dimension filter for sources + tests

* added is_not filtering functionality

* fixed formatting

* fixed admin_test

* added (none) as filter value + is_not filter type in UI

* added prefilling applied filter values and some UI tweaks

* added fetch options

* Make prop suggestions work with `props` filter

* Fix test

* Track login state internally

* Add CHANGELOG entry

Co-authored-by: Uku Taht <uku.taht@gmail.com>
2022-04-21 11:47:15 +03:00