Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Add debug loggin to GA import
Uku Tahtc4f7c9a7a06d
diff --git a/lib/plausible/google/api.ex b/lib/plausible/google/api.exindex 44372da250..be1544bc9c 100644--- a/lib/plausible/google/api.ex+++ b/lib/plausible/google/api.ex@@ -1,6 +1,7 @@defmodule Plausible.Google.Api doalias Plausible.Importeduse Timex+ require Logger@scope URI.encode_www_form("https://www.googleapis.com/auth/webmasters.readonly email https://www.googleapis.com/auth/analytics.readonly"@@ -245,6 +246,8 @@ defmodule Plausible.Google.Api doend)+ Logger.debug(responses)+case Keyword.get(responses, :error) donil ->results =@@ -304,6 +307,8 @@ defmodule Plausible.Google.Api dopageToken: page_token}+ Logger.debug(report)+res =HTTPoison.post!("https://analyticsreporting.googleapis.com/v4/reports:batchGet",@@ -311,6 +316,8 @@ defmodule Plausible.Google.Api doAuthorization: "Bearer #{request.auth.access_token}")+ Logger.debug(res.body)+if res.status_code == 200 doreport = List.first(Jason.decode!(res.body)["reports"])data = report["data"]["rows"]