Skip to content

Commit

Permalink
Merge branch 'master' into release-v215
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga authored Dec 18, 2024
2 parents 8c4b8d0 + 481045b commit 4daa344
Show file tree
Hide file tree
Showing 597 changed files with 21,803 additions and 10,335 deletions.
2 changes: 1 addition & 1 deletion .codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Taht
taht
referer
referers

statics
2 changes: 1 addition & 1 deletion .credo.exs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
# If you don't want TODO comments to cause `mix credo` to fail, just
# set this value to 0 (zero).
#
{Credo.Check.Design.TagTODO, [exit_status: 2]},
{Credo.Check.Design.TagTODO, [exit_status: 0]},
{Credo.Check.Design.TagFIXME, []},

#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/all-checks-pass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
checks: read
steps:
- name: GitHub Checks
uses: poseidon/wait-for-status-checks@v0.5.0
uses: poseidon/wait-for-status-checks@v0.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
63 changes: 0 additions & 63 deletions .github/workflows/build-public-images.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/comment-preview-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Comment with preview URL
uses: thollander/actions-comment-pull-request@v2.5.0
uses: thollander/actions-comment-pull-request@v3.0.1
with:
message: |
<div align="center">
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,19 @@ env:

jobs:
build:
name: "Build and test (${{ matrix.mix_env }}, ${{ matrix.postgres_image }}${{ matrix.test_experimental_reduced_joins == '1' && ', experimental_reduced_joins' || '' }})"
name: "Build and test (${{ matrix.mix_env }}, ${{ matrix.postgres_image }})"
runs-on: ubuntu-latest
strategy:
matrix:
mix_env: ["test", "ce_test"]
postgres_image: ["postgres:16"]
test_experimental_reduced_joins: ["0"]
mix_env: ["test"]
postgres_image: ["postgres:15"]

include:
- mix_env: "test"
postgres_image: "postgres:15"
test_experimental_reduced_joins: "0"
- mix_env: "test"
- mix_env: "ce_test"
postgres_image: "postgres:16"
test_experimental_reduced_joins: "1"

env:
MIX_ENV: ${{ matrix.mix_env }}
TEST_EXPERIMENTAL_REDUCED_JOINS: ${{ matrix.test_experimental_reduced_joins }}
services:
postgres:
image: ${{ matrix.postgres_image }}
Expand All @@ -48,7 +42,7 @@ jobs:
--health-timeout 5s
--health-retries 5
clickhouse:
image: clickhouse/clickhouse-server:24.3.3.102-alpine
image: clickhouse/clickhouse-server:24.8.5.115-alpine
ports:
- 8123:8123
env:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/migrations-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ jobs:
id: changes
with:
list-files: json
predicate-quantifier: 'every'
filters: |
lib:
- 'lib/**'
- '!lib/plausible/data_migration/**'
extra:
- 'extra/**'
config:
- 'config/**'
- if: steps.changes.outputs.lib == 'true'
- if: steps.changes.outputs.lib == 'true' || steps.changes.outputs.extra == 'true' || steps.changes.outputs.config == 'true'
run: |
echo "::error file=${{ fromJSON(steps.changes.outputs.lib_files)[0] }}::Code and migrations shouldn't be changed at the same time"
exit 1
1 change: 1 addition & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ jobs:
- run: npm run check-format --prefix ./assets
- run: npm run test --prefix ./assets
- run: npm run deploy --prefix ./tracker
- run: npm run report-sizes --prefix ./tracker
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ npm-debug.log
/assets/node_modules/
/tracker/node_modules/

# Files generated by Playwright when running tracker tests
/tracker/test-results/
/tracker/playwright-report/
/tracker/blob-report/
/tracker/playwright/.cache/

# Stored hash of source tracker files used in development environment
# to detect changes in /tracker/src and avoid unnecessary compilation.
/tracker/dev-compile/last-hash.txt

# test coverage directory
/assets/coverage

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ All notable changes to this project will be documented in this file.
## Unreleased

### Added
- Dashboard shows comparisons for all reports
- UTM Medium report and API shows (gclid) and (msclkid) for paid searches when no explicit utm medium present.
- Support for `case_sensitive: false` modifiers in Stats API V2 filters for case-insensitive searches.

### Removed

- Internal stats API routes no longer support legacy dashboard filter format.

### Changed

- Details modal search inputs are now case-insensitive.
- Improved report performance in cases where site has a lot of unique pathnames

### Fixed

- Fix returning filter suggestions for multiple custom property values in the dashboard Filter modal
- Fix typo on login screen
- Fix Direct / None details modal not opening

## v2.1.4 - 2024-10-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ clickhouse: ## Start a container with a recent version of clickhouse
docker run $(CH_FLAGS) --volume=$$PWD/.clickhouse_db_vol:/var/lib/clickhouse clickhouse/clickhouse-server:latest-alpine

clickhouse-prod: ## Start a container with the same version of clickhouse as the one in prod
docker run $(CH_FLAGS) --volume=$$PWD/.clickhouse_db_vol_prod:/var/lib/clickhouse clickhouse/clickhouse-server:24.3.3.102-alpine
docker run $(CH_FLAGS) --volume=$$PWD/.clickhouse_db_vol_prod:/var/lib/clickhouse clickhouse/clickhouse-server:24.8.5.115-alpine

clickhouse-stop: ## Stop and remove the clickhouse container
docker stop plausible_clickhouse && docker rm plausible_clickhouse
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
<br /><br />
</p>

[Plausible Analytics](https://plausible.io/) is an easy to use, lightweight (< 1 KB), open source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host Plausible Community Edition or have us manage Plausible Analytics for you in the cloud. Here's [the live demo of our own website stats](https://plausible.io/plausible.io). Made and hosted in the EU 🇪🇺
[Plausible Analytics](https://plausible.io/) is an easy to use, lightweight, open source and privacy-friendly alternative to Google Analytics. It doesn’t use cookies and is fully compliant with GDPR, CCPA and PECR. You can self-host Plausible Community Edition or have us manage Plausible Analytics for you in the cloud. Here's [the live demo of our own website stats](https://plausible.io/plausible.io). Made and hosted in the EU 🇪🇺

We are dedicated to making web analytics more privacy-friendly. Our mission is to reduce corporate surveillance by providing an alternative web analytics tool which doesn’t come from the AdTech world. We are completely independent and solely funded by our subscribers.

![Plausible Analytics](https://plausible.io/docs/img/plausible-analytics.png)

## Why Plausible?

Here's what makes Plausible a great Google Analytics alternative and why we're trusted by 12,000+ paying subscribers to deliver their website and business insights:
Here's what makes Plausible a great Google Analytics alternative and why we're trusted by thousands of paying subscribers to deliver their website and business insights:

- **Clutter Free**: Plausible Analytics provides [simple web analytics](https://plausible.io/simple-web-analytics) and it cuts through the noise. No layers of menus, no need for custom reports. Get all the important insights on one single page. No training necessary.
- **GDPR/CCPA/PECR compliant**: Measure traffic, not individuals. No personal data or IP addresses are ever stored in our database. We don't use cookies or any other persistent identifiers. [Read more about our data policy](https://plausible.io/data-policy)
- **Lightweight**: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is [45x smaller](https://plausible.io/lightweight-web-analytics), making your website quicker to load. You can also send events directly to our [events API](https://plausible.io/docs/events-api).
- **Lightweight**: Plausible Analytics works by loading a script on your website, like Google Analytics. Our script is [small](https://plausible.io/lightweight-web-analytics), making your website quicker to load. You can also send events directly to our [events API](https://plausible.io/docs/events-api).
- **Email or Slack reports**: Keep an eye on your traffic with weekly and/or monthly email or Slack reports. You can also get traffic spike notifications.
- **Invite team members and share stats**: You have the option to be transparent and open your web analytics to everyone. Your website stats are private by default but you can choose to make them public so anyone with your custom link can view them. You can [invite team members](https://plausible.io/docs/users-roles) and assign user roles too.
- **Define key goals and track conversions**: Create custom events with custom dimensions to track conversions and attribution to understand and identify the trends that matter. Includes easy ways to track outbound link clicks, file downloads and 404 error pages.
- **Define key goals and track conversions**: Create custom events with custom dimensions to track conversions and attribution to understand and identify the trends that matter. Track ecommerce revenue, outbound link clicks, file downloads and 404 error pages. Increase conversions using funnel analysis.
- **Search keywords**: Integrate your dashboard with Google Search Console to get the most accurate reporting on your search keywords.
- **SPA support**: Plausible is built with modern web frameworks in mind and it works automatically with any pushState based router on the frontend. We also support frameworks that use the URL hash for routing. See [our documentation](https://plausible.io/docs/hash-based-routing).
- **Smooth transition from Google Analytics**: There's a realtime dashboard, entry pages report and integration with Search Console. You can track your paid campaigns and conversions. You can invite team members. You can even [import your historical Google Analytics stats](https://plausible.io/docs/google-analytics-import). Learn how to [get the most out of your Plausible experience](https://plausible.io/docs/your-plausible-experience) and join thousands who have already migrated from Google Analytics.
Expand Down
1 change: 0 additions & 1 deletion assets/jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"globals": {
"BUILD_EXTRA": true
},
"setupFiles": ["<rootDir>/test-utils/set-fixed-timezone.ts"],
"setupFilesAfterEnv": [
"<rootDir>/test-utils/extend-expect.ts",
"<rootDir>/test-utils/reset-state.ts"
Expand Down
75 changes: 51 additions & 24 deletions assets/js/dashboard/components/dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/** @format */

import React, {
AriaAttributes,
DetailedHTMLProps,
forwardRef,
HTMLAttributes,
Expand All @@ -18,32 +17,60 @@ import {
export const ToggleDropdownButton = forwardRef<
HTMLDivElement,
{
variant?: 'ghost' | 'button'
withDropdownIndicator?: boolean
className?: string
currentOption: ReactNode
children: ReactNode
onClick: () => void
dropdownContainerProps: AriaAttributes
dropdownContainerProps: DetailedHTMLProps<
HTMLAttributes<HTMLButtonElement>,
HTMLButtonElement
>
}
>(({ currentOption, children, onClick, dropdownContainerProps }, ref) => {
return (
<div className="min-w-32 md:w-48 md:relative" ref={ref}>
<button
onClick={onClick}
className="w-full flex items-center justify-between rounded bg-white dark:bg-gray-800 shadow px-2 md:px-3
py-2 leading-tight cursor-pointer text-xs md:text-sm text-gray-800
dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-900"
tabIndex={0}
aria-haspopup="true"
{...dropdownContainerProps}
>
<span className="truncate mr-1 md:mr-2">
<span className="font-medium">{currentOption}</span>
</span>
<ChevronDownIcon className="hidden sm:inline-block h-4 w-4 md:h-5 md:w-5 text-gray-500" />
</button>
{children}
</div>
)
})
>(
(
{
className,
currentOption,
withDropdownIndicator,
children,
onClick,
dropdownContainerProps,
...props
},
ref
) => {
const { variant } = { variant: 'button', ...props }
const sharedButtonClass =
'flex items-center rounded text-sm leading-tight px-2 py-2 h-9'

const buttonClass = {
ghost:
'text-gray-500 hover:text-gray-800 hover:bg-gray-200 dark:hover:text-gray-200 dark:hover:bg-gray-900',
button:
'w-full justify-between bg-white dark:bg-gray-800 shadow text-gray-800 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-900'
}[variant]

return (
<div className={className} ref={ref}>
<button
onClick={onClick}
className={classNames(sharedButtonClass, buttonClass)}
tabIndex={0}
aria-haspopup="true"
{...dropdownContainerProps}
>
<span className="truncate block font-medium">{currentOption}</span>
{!!withDropdownIndicator && (
<ChevronDownIcon className="hidden lg:inline-block h-4 w-4 md:h-5 md:w-5 ml-1 md:ml-2 text-gray-500" />
)}
</button>
{children}
</div>
)
}
)

export const DropdownMenuWrapper = forwardRef<
HTMLDivElement,
Expand All @@ -57,7 +84,7 @@ export const DropdownMenuWrapper = forwardRef<
ref={ref}
{...props}
className={classNames(
'absolute w-full left-0 right-0 md:w-56 md:top-auto md:left-auto md:right-0 mt-2 origin-top-right z-10',
'absolute left-0 right-0 mt-2 origin-top-right z-10',
className
)}
>
Expand Down
6 changes: 3 additions & 3 deletions assets/js/dashboard/components/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ColumnConfiguraton<T extends Record<string, unknown>> = {
/** Unique column ID, used for sorting purposes and to get the value of the cell using rowItem[key] */
key: keyof T
/** Column title */
label: ReactNode
label: string
/** If defined, the column is considered sortable. @see SortButton */
onSort?: () => void
sortDirection?: SortDirection
Expand All @@ -20,7 +20,7 @@ export type ColumnConfiguraton<T extends Record<string, unknown>> = {
/**
* Function used to transform the value found at item[key] for the cell. Superseded by renderItem if present. @example 1120 => "1.1k"
*/
renderValue?: (value: unknown) => ReactNode
renderValue?: (item: T) => ReactNode
/** Function used to create richer cells */
renderItem?: (item: T) => ReactNode
}
Expand Down Expand Up @@ -85,7 +85,7 @@ export const ItemRow = <T extends Record<string, string | number | ReactNode>>({
{renderItem
? renderItem(item)
: renderValue
? renderValue(item[key])
? renderValue(item)
: (item[key] ?? '')}
</TableCell>
))}
Expand Down
Loading

0 comments on commit 4daa344

Please sign in to comment.