Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Continued] Google Analytics import #1753

Merged
merged 148 commits into from
Mar 10, 2022
Merged

[Continued] Google Analytics import #1753

merged 148 commits into from
Mar 10, 2022

Conversation

ukutaht
Copy link
Contributor

@ukutaht ukutaht commented Mar 10, 2022

Changes

Implements import from Google Analytics. 90% of the work is done by @m-col so credit goes to him :) I'm just putting some polish on the feature in this PR like:

  • Importing hostnames in case we want to surface that in the future
  • Adds some test coverage
  • Showing monthly traffic numbers in timeseries
  • Renames timestamp to date
  • Etc

STATUS: This is ready to go for testing with some real data. I will put this on our staging environment tomorrow to start soliciting testers.

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

Dark mode

  • The UI has been tested both in dark and light mode

This adds another entry to the JSON data returned via the main graph API
called `imported_plot`, which is similar to `plot` in form but will be
completed with previously imported data.  Currently it simply returns
the values from `plot` / 2. The data is rendered in the main graph in
red without fill, and without an indicator for the present. Rationale:
imported data will not continue to grow so there is no projection
forward, only backwards.
This changes "visitors" and in some places "sources" to atoms. This does
not change the behaviour of the functions - the tests all pass unchanged
following this commit. This is necessary as joining subqueries requires
that the keys in `select` statements be atoms and not strings.
This needs a bit more work on the google import side, as GA do not
report sources and utm sources as distinct things.
This extends the merge_imported function definition for sources to
utm_sources, utm_mediums and utm_campaigns too. This appears to be
working on the DB side but something is incomplete on the client side.
…ashboard view

This requires converting the `"visits"` and `"visit_duration"` metrics
to atoms so that they can be used in ecto subqueries.
@bundlemon
Copy link

bundlemon bot commented Mar 10, 2022

BundleMon

Files updated (1)
Status Path Size Limits
static/js/dashboard.js
284.19KB (+297B +0.1%) -
Unchanged files (6)
Status Path Size Limits
static/css/app.css
514.8KB -
static/js/app.js
12.13KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.06KB -
tracker/js/plausible.js
750B -
static/js/applyTheme.js
314B -

Total files change +297B +0.04%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@ukutaht ukutaht merged commit e27734e into master Mar 10, 2022
@ukutaht ukutaht deleted the pr/1466 branch March 10, 2022 21:05
@ukutaht ukutaht mentioned this pull request Mar 10, 2022
32 tasks
@bhavin192
Copy link
Contributor

@ukutaht I was going through the CHANGELOG.md, and didn't see this feature mentioned there. I think it should be added there.

@ukutaht
Copy link
Contributor Author

ukutaht commented Apr 25, 2022

Good point, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants