Closed tssge closed 2 years ago
Thanks for the feedback @tssge! GA import is not supported in the latest version of our self-hosted release. It was never supported by self-hosted in fact so you must be using some unofficial package which explains the errors. The latest and the only supported version of self-hosted is 1.4.4: https://github.com/plausible/analytics/releases/tag/v1.4.4. We plan to introduce GA import into the self-hosted release at some point later this year. Thanks!
Hi @tssge ! Thank you for this snippet -- I experienced the same bug, it was awesome to finally find a way to fix it. I made a quick guide on how to implement it in a self hosted Plausible installation, and put it in a repository in case anyone else was wondering.
Past Issues Searched
Issue is a Bug Report
Using official Plausible Cloud hosting or self-hosting?
Self-hosting
Describe the bug
The map fails to load after Google Analytics data is imported for the site. An exception is raised by Plausible:
This is due to mismatch between data types of Clickhouse table
events
columncountry_code
which is being joined withimported_locations
columncountry
.country_code
is of typeLowCardinality(FixedString(2))
butcountry
is of typeString
. Also in events tablecity_geoname_id
is of typeUInt32
while inimported_locations
tablecity
is of typeUInt64
.This can be probably fixed by migration, but I don't have the skills to create a proper one with Ecto/Elixir.
I did:
This fixes the issue, but of course is not a proper fix.
Expected behavior
The map should load as expected without Error 500.
Screenshots
Environment