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

Implement Google analytics stats field in Article #166

Closed
MrOrz opened this issue May 11, 2020 · 4 comments
Closed

Implement Google analytics stats field in Article #166

MrOrz opened this issue May 11, 2020 · 4 comments
Assignees

Comments

@MrOrz
Copy link
Member

MrOrz commented May 11, 2020

Article should provide a field that returns analytics data for trend charts using Google Analytics Reporting API

  • Chatbot visit per day
  • Chatbot user count per day
  • Chatbot total visit in 30 days
  • Chatbot total user in 30 days
  • All above stats, but using Cofacts production site as target

Related:

@MrOrz MrOrz self-assigned this May 11, 2020
@MrOrz
Copy link
Member Author

MrOrz commented Jun 5, 2020

Alternative:

we can deploy a super-proxy in Google app engine instead.
https://github.com/googleanalytics/google-analytics-super-proxy#readme

Pros

  • It has cache that helps keep usage below quota
  • Allows rumors-site to fetch data directly, don't put burden on API server

Cons

  • All API queries must be provided using admin panel, and each queries cannot include arguments. This means that we cannot create a query that takes articleId as a parameter.
    • Even if we modify the code to attach articleId, many its inner workings (such as cache) relies on query IDs, which means that supporting articleId may take a lot of effort.
  • GAE may incur additional cost (needs testing)
  • Super proxy is no longer maintained, may need to fork to get timezone / CORS right

@MrOrz
Copy link
Member Author

MrOrz commented Jun 30, 2020

@MrOrz MrOrz assigned ztsai and unassigned MrOrz Jul 5, 2020
@ztsai
Copy link
Contributor

ztsai commented Jul 8, 2020

Server side todo list

Client side todo list

  • Implement chart

@ztsai
Copy link
Contributor

ztsai commented Sep 14, 2020

closing this issue as the feature is completed
additional UI/UX enhancement will be tracked here: cofacts/rumors-site#332

@ztsai ztsai closed this as completed Sep 14, 2020
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

No branches or pull requests

2 participants