mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Update migration script.
This commit is contained in:
parent
6ced493c22
commit
907a6850db
1 changed files with 3 additions and 2 deletions
|
|
@ -25,7 +25,8 @@ FROM (SELECT event_id, website_id, session_id,
|
|||
(regexp_matches(url_query, '(?:[&?]|^)utm_medium=([^&]+)', 'i'))[1] AS utm_medium,
|
||||
(regexp_matches(url_query, '(?:[&?]|^)utm_source=([^&]+)', 'i'))[1] AS utm_source,
|
||||
(regexp_matches(url_query, '(?:[&?]|^)utm_term=([^&]+)', 'i'))[1] AS utm_term
|
||||
FROM "website_event") url
|
||||
FROM "website_event"
|
||||
WHERE url_query IS NOT NULL) url
|
||||
WHERE we.event_id = url.event_id
|
||||
and we.session_id = url.session_id
|
||||
and we.website_id = url.website_id;
|
||||
|
|
@ -45,4 +46,4 @@ SET fbclid = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[
|
|||
utm_medium = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[&?]|^)utm_medium=[^&]+'), '=', -1), '&', 1), 255),
|
||||
utm_source = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[&?]|^)utm_source=[^&]+'), '=', -1), '&', 1), 255),
|
||||
utm_term = LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REGEXP_SUBSTR(url_query, '(?:[&?]|^)utm_term=[^&]+'), '=', -1), '&', 1), 255)
|
||||
WHERE 1 = 1;
|
||||
WHERE url_query IS NOT NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue