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

Check for if Google Analytics Setup invokes a lib file directly which causes class loader issues in Dev. #419

Merged
merged 4 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DB_NAME=quepid

REDIS_URL=redis://redis:6379/1

QUEPID_GA=UA-
QUEPID_GA=
QUEPID_DOMAIN=localhost

INTERCOM_APP_ID=
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_common_js.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if Analytics::GoogleAnalytics.enabled? %>
<% if Rails.application.config.google_analytics_enabled %>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
Expand Down
1 change: 1 addition & 0 deletions config/initializers/customize_quepid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
# == Google Analytics
# To enable Google Analytics, set this environment variable.
Rails.application.config.google_analytics = ENV.fetch('QUEPID_GA', '')
Rails.application.config.google_analytics_enabled = Rails.application.config.google_analytics.present?

# == Domain Quepid is Running Under
# Certain features, like sending emails and Google Analytics require you to set the domain that Quepid
Expand Down
9 changes: 9 additions & 0 deletions docs/operating_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ To comply with GDPR, and be a good citizen, the hosted version of Quepid asks if
EMAIL_MARKETING_MODE=true # Enables a checkbox on user signup to consent to emails
```

# User Tracking

We currently only support Google Analytics, and you enable it by setting the following `ENV` var:

```
QUEPID_GA=XXXXXXXXXXXX # Your Google Analytics Key
```


# Healthcheck

Want to monitor if Quepid is behaving? Just monitor `/healthcheck`, and you will get 200 status codes from a healthy Quepid, and 503 if not. The JSON output is `{"code":200,"status":{"database":"OK","migrations":"OK"}}`.