Commit Graph

1806 Commits

Author SHA1 Message Date
Robert
f9fc0a741e use EmailView function for greeting user and change layout email signature 2022-11-10 15:52:55 +02:00
ruslandoga
0b7870dc4d
improve first launch experience for self-hosters (#2357)
* first launch

* dynamic children, wait for repo

* remove wait_for_repo and app env manipulations

* don't mention free trial in self-hosted pages

* add changelog

* assigns[:is_selfhost] -> @is_selfhost

* better changelog wording

* rm admin_user, admin_email, admin_pwd from app env

* rm DISABLE_AUTH

* redirect / to /login when not authenticated

* remove TODO

* Update lib/plausible_web/controllers/page_controller.ex

Co-authored-by: Uku Taht <Uku.taht@gmail.com>

* format

Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2022-11-10 12:42:22 +01: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
Robert
92df3b2577 do not use default layout in internal email 2022-11-10 10:32:33 +02:00
Robert
37c927287e speak on behalf of 'we' not 'I' 2022-11-10 10:31:32 +02:00
Robert
d6125ffeb1 add tests for base_email template 2022-11-09 19:56:46 +02:00
Adam Rutkowski
6c7d2eb2b5
CRM: Expose rate limiting fields per site (#2429)
* Move schemas to paths corresponding to their namespace

* Include rate-limiting site schema fields

* Expose CRM RW access to site rate-limiting fields

* Remove 👾

* Add basic moduledoc placeholders
2022-11-09 14:46:20 +01:00
Adam Rutkowski
aa248dde2e
Add sites metadata rate limit migration (#2428)
* Generate ecto migration for rate limiting sites

* Add ingest rate limit meta-data migration

* Make scale limit seconds not nullable
2022-11-09 11:40:05 +01:00
Robert
69f846fb07 do not use default layout in some emails 2022-11-09 11:12:53 +02:00
Robert
ff16aa9df8 remove all repeated email footers 2022-11-09 10:20:12 +02:00
Robert
eaf61ff170 set unsubscribe flags for unsubscribable emails 2022-11-09 10:17:33 +02:00
Robert
a45580099d replace other salutation cases and make sure @user available in assigns 2022-11-08 19:58:53 +02:00
Robert
1d2a15ea28 remove user salutations by @user as done by the layout 2022-11-08 19:46:01 +02:00
Robert
31c8ebe842 add a default base_email layout to every email 2022-11-08 19:17:47 +02:00
Vinicius Brasil
042b448d30
Trace external HTTP requests (#2419)
This commit adds OTEL tracing to external HTTP requests made with
the HttpClient module. It records the elapsed time, host, path, and
response status code.
2022-11-07 15:05:12 -03:00
Uku Taht
8bdbabbdad
Enable Dialyzer and Credo in CI (#2315) 2022-11-04 23:42:03 -03:00
Conner Vieira
271704388a
Fixed a minor typo for consistency (#2420) 2022-11-04 23:28:53 -03:00
Adam Rutkowski
9364cebb4b
Fix up Cachex metrics (#2418)
* Fix cachex size metrics

* Collect Cachex hit ratio for UAs/Sessions

* Revert profiling metrics from 101e5a68
2022-11-03 12:28:02 +01:00
Robert
fbe3a4e6f1 add a test and fix rendering the dashboard link 2022-11-03 11:31:32 +02:00
sandstrom
34983a4fc5 Timestamp changelog 2022-11-03 09:01:06 +07:00
Marko Saric
fc3be2a5b8
Update to keep the in-app footer consistent with the main site footer (#2413) 2022-11-02 12:34:49 +01:00
ruslandoga
9b973613b1
rm conflict artifact (#2412) 2022-11-02 11:48:08 +01:00
Adam Rutkowski
101e5a68b5
Allow Site DB lookups during ingestion phase (#2408)
* Implement FF-driven DB lookup for sites during ingestion

We like to see the impact of doing a simple postgres lookup on each
ingestion event. The percentage-based feature flag `:ingestion_pg_lookup`
must be set in order for lookups to be executed.

* Fix resolving Cachex stats metrics

* Enable PromEx on dev env
2022-11-01 17:11:50 +02:00
Vinicius Brasil
11d7cf01c9
Remove ingestion from OTEL tracing (#2409)
This commit removes the current 1% sampling on ingestion to completely
ignore ingestion traces. We are not getting enough value from those, and
we'll keep dashboard, API and background jobs traces only.
2022-11-01 10:27:23 -03:00
Marko Saric
f9a2d00582
Changing the settings link in the renewal email (#2406)
Someone mentioned there's no way to cancel from the link we include in this email (https://plausible.io/billing/upgrade) so I'm changing it to the settings page instead https://plausible.io/settings. My own https://plausible.io/billing/upgrade is a bit different than normal subscribers see it so I don't actually know if there's a way to cancel on it. If there is a way there too, feel free to ignore this
2022-11-01 13:42:36 +02:00
Vinicius Brasil
90c78e8995
Move GA fixtures to fixtures/ folder (#2398)
This commit fixes up 29347126db871429d9e5c37c63c4f79.
2022-10-29 09:44:10 +02:00
Vinicius Brasil
b2047d8975
Show 0% difference instead of N/A (#2401)
Closes #2397
2022-10-28 11:21:07 -03:00
Adam Rutkowski
c604e49f4d
Update the snippet from js/plausible.js to js/script.js (#2395)
As per https://plausible.io/docs/plausible-script
2022-10-27 13:20:53 -03:00
RobertJoonas
7ccbc5d432
fix typos (#2393) 2022-10-27 08:57:34 +02:00
Adam Rutkowski
a44b8ff7f5
Improve test coverage (#2392)
Co-authored-by: ruslandoga <doga.ruslan@gmail.com>
2022-10-27 08:39:34 +02:00
dependabot[bot]
499b46f4c4
Bump bamboo_smtp from 4.1.0 to 4.2.2 (#2337)
Bumps [bamboo_smtp](https://github.com/fewlinesco/bamboo_smtp) from 4.1.0 to 4.2.2.
- [Release notes](https://github.com/fewlinesco/bamboo_smtp/releases)
- [Changelog](https://github.com/fewlinesco/bamboo_smtp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fewlinesco/bamboo_smtp/compare/v4.1.0...v4.2.2)

---
updated-dependencies:
- dependency-name: bamboo_smtp
  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-26 17:59:36 -03:00
Adam Rutkowski
6ba5e53574
Trim goals when creating and retrieving from the DB (#2382)
People are likely to enter (copy/paste) goals from external sources
which can lead to whitespace characters appended by accident.
That renders the goal unusable and hard to distinct visually.

Normally to fix up existing goals we would use a data migration,
but this should be good enough to check if the problem
with never appearing goals resurfaces.
2022-10-26 09:35:30 +02:00
Marko Saric
252cecbf25
Correct the spelling of JavaScript (#2380)
* Update README.md

* Update snippet.html.eex

* Update settings_general.html.eex

* Update site_controller_test.exs
2022-10-26 08:34:33 +02:00
Vinicius Brasil
73444ddfb6
Fix and test Google Analytics token refresh (#2381)
This commit fixes a bug where Google Analytics import tokens were not
being refreshed properly because the function was not returning the
expected tuple. Thanks to @aerosol we can nicely test this now.
2022-10-26 07:43:49 +02:00
Adam Rutkowski
8e75f2fc07
Separate GA/SC scopes (#2372)
* Use separate scopes for GA/SC integrations

* Update tests with google scope expectations
2022-10-25 08:17:17 -03:00
Adam Rutkowski
d29597ed37
Fix random typos (#2375) 2022-10-25 08:17:09 -03:00
Vinicius Brasil
c9945e09cf
Suggest enterprise plan when usage is greater than 10M pageviews (#2345) 2022-10-25 13:16:44 +02:00
Vinicius Brasil
a86d9697ba
Clear stats_start_date after clearing GA stats (#2370)
This commit fixes a bug where users clearing one import and trying to
re-import would get invalid import date ranges. This was caused because
the stats_start_date field was not updated to nil after clearing
imported stats, as this field defines the end date of the import.
2022-10-25 12:17:59 +02:00
Vinicius Brasil
b883d44697
Implement exponential backoff for GA requests (#2366)
This commit adds exponential backoff to GA request retries, increasing
the waiting time between requests.
2022-10-25 12:17:19 +02:00
Adam Rutkowski
0c23e6ec57
Update Makefile with tracker generation (#2356) 2022-10-24 07:52:15 -03:00
Adam Rutkowski
3ddfda94a1
Fix up Purge tests (#2364) 2022-10-24 07:15:18 -03:00
Vinicius Brasil
e48851a9ed
Skip rows with empty dates from GA imports (#2359) 2022-10-24 07:13:52 -03:00
Vinicius Brasil
9a61a10273
Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -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
Vinicius Brasil
93bb62ef27
Remove inserts per second Google Analytics test assertion (#2334)
This commit removes a flaky test assertion from the GA suite. The
initial purpose of this test was to ensure we are not inserting to
Clickhouse more than 1 time per second during an import.

Although it is nice to have an assertion like this, the test is flaky
and fails sometimes. To get the total inserts during a time range, it
queries Clickhouse internal tables for insert commands, and this number
is not deterministic.

In a real-world scenario with Clickhouse, the app runs in multiple nodes
not aware of their neighbors' CH calls. In that case, Grafana provides
us visibility over CH, and these tests do not suffice.
2022-10-20 10:26:40 -03:00
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