Commit Graph

1711 Commits

Author SHA1 Message Date
Vinicius Brasil
b898642373
Double maximum header length (#2353)
This commit makes the permitted header length more permissive, 8,192
bytes, doubling the Phoenix default.

Related to https://github.com/4lejandrito/next-plausible/issues/67
2022-10-19 09:41:05 -03:00
Vinicius Brasil
95aafb477d
Parse Google Analytics failed response before reporting to Sentry (#2354)
This commit parses failed GA responses to JSON before reporting to
Sentry. This makes Sentry's PII filtering smarter, redacting only
specific keys from the response, instead of the whole string.
2022-10-19 09:22:52 -03:00
ruslandoga
ad10721d46
add v prefix to version tags in public images (#2340) 2022-10-19 09:09:09 -03:00
RobertJoonas
409f1733ce
Optimize dark mode UI for shared link form (#2355)
* remove redundant empty div

* optimize shared link form for darkmode

* follow the same style in new_api_key form
2022-10-19 09:02:27 -03:00
RobertJoonas
54071fbc1b
Merge pull request #2348 from plausible/failed-ga-import-email
add debugging info to failed GA import email template
2022-10-18 19:54:16 +03:00
Robert
f6593cef17 replace contact link with reply to this email 2022-10-18 19:47:20 +03:00
ruslandoga
3db2b1cbd7
update clickhouse and postgres images in Makefile (#2343)
* update clickhouse and postgres images in Makefile

* update .PHONY
2022-10-18 17:13:59 +02:00
Vinicius Brasil
9220d0034d
OpenTelemetry (OTEL) Implementation (#2317)
This pull request improves the current OpenTelemetry implementation. Currently only 1% of the spans are sent, due to the high volume of ingestion requests to /api/event. I enabled the 1% sampling to /api/event only, recording 100% of the other traces.
2022-10-18 12:11:30 -03:00
Marko Saric
a68093b0b6
Adding LinkedIn to the in-app footer (#2347) 2022-10-18 16:09:07 +02:00
Robert
cc8bed9c4a add debugging info to failed GA import email template 2022-10-18 14:17:35 +03:00
Marko Saric
1dcfbf9f90
Adding LinkedIn 2022-10-18 08:12:18 +02:00
Adam Rutkowski
e3ca3b32db
Include tests for Captcha success/failure scenarios (#2344)
* Include tests for Captcha success/failure scenarios

* DRY
2022-10-17 08:16:59 -03:00
Adam Rutkowski
aa97e9cf89
Notify team on image build failures (#2331) 2022-10-13 11:41:05 -03:00
Vinicius Brasil
3c8b71ea3c
Revert "Bump hexpm/elixir (#2239)" (#2332)
This reverts commit 76806a8924.
2022-10-13 11:38:59 -03:00
Vinicius Brasil
c26e029d22
Increase flaky test timeout (#2330) 2022-10-13 14:56:25 +02:00
Adam Rutkowski
28cec9d939
Automatically decode JSON payloads from HTTP (#2329) 2022-10-13 09:39:15 -03:00
dependabot[bot]
735ef94397
Bump csv from 2.4.1 to 2.5.0 (#2328)
Bumps csv from 2.4.1 to 2.5.0.

---
updated-dependencies:
- dependency-name: csv
  dependency-type: direct:production
  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-10-13 14:11:28 +02:00
Vinicius Brasil
fb05e447f9
Increase Google Analytics timeout and lower page size (#2326)
The Google Analytics report request may take some time, especially with big
imports with thousands of pages. To mitigate the issue this commit increases
the timeout to 60s and lowers the page size to 7,500 records per request.
2022-10-13 14:10:00 +02:00
dependabot[bot]
76806a8924
Bump hexpm/elixir (#2239)
Bumps hexpm/elixir from 1.13.4-erlang-24.3.3-alpine-3.15.3 to 1.13.4-erlang-24.3.3-alpine-3.16.0.

---
updated-dependencies:
- dependency-name: hexpm/elixir
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-10-13 08:02:57 +02:00
dependabot[bot]
97f6332a79
Bump httpoison from 1.8.1 to 1.8.2 (#2307)
Bumps [httpoison](https://github.com/edgurgel/httpoison) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/edgurgel/httpoison/releases)
- [Commits](https://github.com/edgurgel/httpoison/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: httpoison
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-10-13 08:02:14 +02:00
Adam Rutkowski
ae4ae5d0a0
Handle duplicate invitations gracefully (#2323) 2022-10-11 11:40:20 -03:00
Adam Rutkowski
ec90a264b4
Improve user input validation (#2291)
* Make pagination params parsing ignore bad input

* Remove unused binding

* Don't crash on filter parse error

* Sanitize input date on internal stats API

* Revert Query module changes (ref 55645734)

* Implement simplistic input date validation in stats controller

* Mute bad request logging
2022-10-11 14:42:14 +02:00
RobertJoonas
38d5e00442
update contributing.md and makefile to install tracker deps (#2322) 2022-10-11 14:24:26 +02:00
Uku Taht
2c2f710d24 Push public image 2022-10-11 13:35:34 +02:00
RobertJoonas
c0da024b23
Remove static tracker files (#2116)
* remove tracker files from git index

* generate tracker files on npm test

* generate tracker files for elixir tests/dev/CI

* update tracker/package-lock.json

* exclude npm run deploy from mix test + some docs
2022-10-11 12:19:28 +02:00
Vinicius Brasil
8f6f860bd2
Add --host option to send_event task (#2320)
This commit adds an option to override `http://localhost:8000` in
`mix send_event`. This is useful when running the server in another port
or with remote servers such as staging.
2022-10-11 12:13:55 +02:00
Vinicius Brasil
0733efa89e
Delete stats improvements (#2318)
* Move clear stats functions to Plausible.Purge

* Delete both native and imported stats when deleting a site

This commit moves the delete site function to the Plausible.Purge
module, and fixes a bug where deleted sites could leave dangling
imported stats.

* Clear sites.stats_start_date after clearing stats

This commit fixes a bug where resetting stats left an invalid state of
the stats_start_date field, used for GA imports, for example.
2022-10-10 08:55:58 -03:00
Uku Taht
aadf892a71
Increase DB query timeout for site transfers (#2309) 2022-10-06 14:17:35 +03:00
Vinicius Brasil
4a2e0af337
Override stats_start_date in CRM (#2310)
* Refactor Plausible.Sites.stats_start_date/1 function

This commit adds documentation, typespecs and better pattern matching to
the Plausible.Sites.stats_start_date/1 function.

* Use memoized stats_start_date instead of querying CH

* Prevent domain from being updated from CRM

* Add stats_start_date to CRM site form

This commit adds stats_start_date to CRM site form, and creates a
separate Ecto changeset for CRM changes.

* Alias Plausible.Site calls

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

* List all timezones in CRM form

* Require sites.public in CRM changeset

Co-authored-by: Adam Rutkowski <hq@mtod.org>
2022-10-06 08:08:22 -03:00
Adam Rutkowski
523b114682
Allow super-admin Stats API access for locked sites (#2308) 2022-10-05 12:04:37 +02:00
Adam Rutkowski
ceff6e17b2
CRM: order sites by latest. Tolerate missing owner (#2305) 2022-10-05 11:41:04 +03:00
Uku Taht
eca71b9b60 Run CI against all supported PostgreSQL versions 2022-10-05 11:01:41 +03:00
Vinicius Brasil
beabef7269
Redirect user after upgrading only when subscription is created (#2285)
* Create API to check for an active subscription

* Redirect after upgrading only when subscription is created

* Change upgrade page copy

* Add timeout notice to upgrade success page
2022-10-04 15:54:54 +03:00
Adam Rutkowski
bf2b6880c5
Block Stats API for locked sites (#2302)
* Extract Sites.locked? predicate

* Lock Stats API when dashboard is locked

* Tidy tests

* Don't pollute application env from tests

* Add changelog entry

* Revert "Add changelog entry"

This reverts commit 76346074f9.
2022-10-04 15:34:45 +03:00
dependabot[bot]
24ed29fdee
Bump plug from 1.13.4 to 1.13.6 (#2301)
Bumps [plug](https://github.com/elixir-plug/plug) from 1.13.4 to 1.13.6.
- [Release notes](https://github.com/elixir-plug/plug/releases)
- [Changelog](https://github.com/elixir-plug/plug/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-plug/plug/compare/v1.13.4...v1.13.6)

---
updated-dependencies:
- dependency-name: plug
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-10-04 14:33:48 +02:00
Adam Rutkowski
992ce0e802
Remove redundant logger from Plug (#2303) 2022-10-04 09:09:08 -03: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
ruslandoga
bac3c3e4e5
lite geonames (#2214) 2022-10-04 10:54:24 +03:00
dependabot[bot]
c079ff05c1
Bump credo from 1.6.4 to 1.6.7 (#2296)
Bumps [credo](https://github.com/rrrene/credo) from 1.6.4 to 1.6.7.
- [Release notes](https://github.com/rrrene/credo/releases)
- [Changelog](https://github.com/rrrene/credo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rrrene/credo/compare/v1.6.4...v1.6.7)

---
updated-dependencies:
- dependency-name: credo
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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-10-04 10:46:43 +03:00
Adam Rutkowski
c8ffcc413f
Prevent sensitive information from being logged (#2300) 2022-10-04 10:46:01 +03:00
Uku Taht
12a513f3cd
Remove Mimic dependency (#2280) 2022-10-03 11:41:51 -03:00
RobertJoonas
f75d5106f0
Rework outbound links and file downloads (#2208)
* moved custom event code to the bottom + fix indentation

* add handlebars helper fn + extract getLinkEl fn

* extract isOutboundLink function

* extract shouldFollowLink function

* remove middle and click variables

* use only one click handler for outbounds and downloads

* extract sendLinkClickEvent function

* add error handling when script compilation fails

* use callback instead of fixed timeout

* do not prevent default if externally prevented + test

* add more tests

* generate tracker files in priv/tracker/js

* update changelog

* requested changes after review

* regenerate tracker files

* use return instead of else if

* move middleMouseButton outside the function
2022-09-29 14:12:35 +03:00
Uku Taht
4096d88171
[Sentry APP-189] Fallback to current date in all time parsing (#2277)
* Fallback to current date in all time parsing

* Add changelog
2022-09-28 09:45:37 -03:00
Uku Taht
65f0ce3061
[Sentry APP-5B] Ensure form errors can be rendered on /settings (#2278)
* Ensure form errors can be rendered on /settings

* Changelog
2022-09-28 08:56:07 -03:00
Uku Taht
d104abb53d
Add fallback for favicon (#2279)
* Add fallback for favicon

* Add Favicon tests

* Changelog

* Move placeholder icon to priv folder
2022-09-28 08:55:46 -03:00
Vinicius Brasil
7489290d11
International Domain Names (IDN) Support (#2034)
* Accept letters from non-Latin alphabets in domain names

* Replace static URLs with Router functions in settings_visibility

* Beautify dashboard URL in visibility tab

* Add IDN support to CHANGELOG
2022-09-28 10:42:15 +03:00
Vinicius Brasil
c07361fbce
Increase GA import request receive_timeout to 30s (#2274)
This commit increases the receive_timeout from 15s to 30s for Google
Analytics import requests. Timeouts have been reported, and I could
replay some requests that took 15-20 seconds to complete when fetching
10,000 records in a single request.
2022-09-28 10:37:44 +03:00
Uku Taht
519a1fa669
Add script to send pageview (#2272)
* Add script to send fake pageviews

* Fix option typo

* Remove dummy_event from .PHONY in Makefile
2022-09-27 17:58:22 +03:00
Vinicius Brasil
52b4ee6287
fixup! Refresh Google Analytics token before import (#2254) (#2273) 2022-09-26 16:21:19 -03:00
RobertJoonas
155e274150
Stats API: allow escaping | literal character with \| when filtering (#2266)
* add separate module for filter parsing

* add tests for filter parser

* allow escaping pipe character in filter value

* add documentation and doctests

* do not remove escape chars from wildcard values

* changelog update

* change the parse_filters/1 function argument
2022-09-26 16:20:08 +03:00