forked from umami-software/umami
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request umami-software#3061 from umami-software/dev
v2.14.0
- Loading branch information
Showing
128 changed files
with
16,222 additions
and
2,374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Create docker images | ||
|
||
on: | ||
push: | ||
branches: | ||
- analytics | ||
|
||
jobs: | ||
build: | ||
name: Build, push, and deploy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Generate random hash | ||
id: random_hash | ||
run: echo "hash=$(openssl rand -hex 4)" >> $GITHUB_OUTPUT | ||
|
||
- uses: mr-smithers-excellent/docker-build-push@v6 | ||
name: Build & push Docker image to docker.io | ||
with: | ||
image: umamisoftware/umami | ||
tags: cloud-${{ steps.random_hash.outputs.hash }}, cloud-latest | ||
buildArgs: DATABASE_TYPE=postgresql | ||
registry: docker.io | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
-- add tag column | ||
ALTER TABLE umami.website_event ADD COLUMN "tag" String AFTER "event_name"; | ||
ALTER TABLE umami.website_event_stats_hourly ADD COLUMN "tag" SimpleAggregateFunction(groupArrayArray, Array(String)) AFTER "max_time"; | ||
|
||
-- update materialized view | ||
DROP TABLE umami.website_event_stats_hourly_mv; | ||
|
||
CREATE MATERIALIZED VIEW umami.website_event_stats_hourly_mv | ||
TO umami.website_event_stats_hourly | ||
AS | ||
SELECT | ||
website_id, | ||
session_id, | ||
visit_id, | ||
hostname, | ||
browser, | ||
os, | ||
device, | ||
screen, | ||
language, | ||
country, | ||
subdivision1, | ||
city, | ||
entry_url, | ||
exit_url, | ||
url_paths as url_path, | ||
url_query, | ||
referrer_domain, | ||
page_title, | ||
event_type, | ||
event_name, | ||
views, | ||
min_time, | ||
max_time, | ||
tag, | ||
timestamp as created_at | ||
FROM (SELECT | ||
website_id, | ||
session_id, | ||
visit_id, | ||
hostname, | ||
browser, | ||
os, | ||
device, | ||
screen, | ||
language, | ||
country, | ||
subdivision1, | ||
city, | ||
argMinState(url_path, created_at) entry_url, | ||
argMaxState(url_path, created_at) exit_url, | ||
arrayFilter(x -> x != '', groupArray(url_path)) as url_paths, | ||
arrayFilter(x -> x != '', groupArray(url_query)) url_query, | ||
arrayFilter(x -> x != '', groupArray(referrer_domain)) referrer_domain, | ||
arrayFilter(x -> x != '', groupArray(page_title)) page_title, | ||
event_type, | ||
if(event_type = 2, groupArray(event_name), []) event_name, | ||
sumIf(1, event_type = 1) views, | ||
min(created_at) min_time, | ||
max(created_at) max_time, | ||
arrayFilter(x -> x != '', groupArray(tag)) tag, | ||
toStartOfHour(created_at) timestamp | ||
FROM umami.website_event | ||
GROUP BY website_id, | ||
session_id, | ||
visit_id, | ||
hostname, | ||
browser, | ||
os, | ||
device, | ||
screen, | ||
language, | ||
country, | ||
subdivision1, | ||
city, | ||
event_type, | ||
timestamp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- AlterTable | ||
ALTER TABLE `website_event` ADD COLUMN `tag` VARCHAR(50) NULL; | ||
|
||
-- CreateIndex | ||
CREATE INDEX `website_event_website_id_created_at_tag_idx` ON `website_event`(`website_id`, `created_at`, `tag`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- AlterTable | ||
ALTER TABLE "website_event" ADD COLUMN "tag" VARCHAR(50); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "website_event_website_id_created_at_tag_idx" ON "website_event"("website_id", "created_at", "tag"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.