analytics/lib/workers
Vini Brasil 1cb07efe6d
Save city name when importing from GA (#2608)
This commit adds city data to imported records from Google Analytics. The
current implementation sets city to 0 because GA does not use the GeoNames
database.

Google Analytics Reporting API uses [Geographical IDs](https://developers.google.com/analytics/devguides/collection/protocol/v1/geoid)
to identify cities and countries. Plausible uses
[GeoNames](https://geonames.org/) and I couldn't find databases corelating the
two.

Fortunately, GA also returns the city name and this commit uses the city name
and the country ISO code to find the Geoname ID. To avoid making expensive ETS
searches, I created another ETS table in the Location library that uses
{country, city} as a key.

Related PR: https://github.com/plausible/location/pull/3
2023-02-14 09:32:18 -03:00
..
check_usage.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
clean_email_verification_codes.ex Add :ok return to CleanEmailVerificationCodes (#1018) 2021-05-14 10:55:08 +03:00
clean_invitations.ex Invitations (#1122) 2021-06-16 15:00:07 +03:00
import_google_analytics.ex Save city name when importing from GA (#2608) 2023-02-14 09:32:18 -03:00
lock_sites.ex Make sure the latest subscription is always used 2021-06-18 11:13:54 +03:00
notify_annual_renewal.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
rotate_salts.ex Upgrades Oban to v2.6.1 (#967) 2021-04-26 11:32:18 +03:00
schedule_email_reports.ex Do not send email reports for locked sites 2021-06-17 10:20:54 +03:00
send_check_stats_emails.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
send_email_report.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
send_site_setup_emails.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
send_trial_notifications.ex Do not report hard bounce e-mail errors to Sentry (#2361) 2022-10-24 07:13:23 -03:00
spike_notifier.ex add a test and fix rendering the dashboard link 2022-11-03 11:31:32 +02:00
stats_removal.ex Delay stats deletions (#2632) 2023-01-31 16:11:04 -03:00