-
Notifications
You must be signed in to change notification settings - Fork 32
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
4032 migrate to ahoy #4044
4032 migrate to ahoy #4044
Conversation
But we are no longer using Rollbar (or won't soon), but Appsignal
instead...
|
FYI, we still have rollbar because of the JS #3240. I'm going to move this issue to Business as usual |
f763c8a
to
55e23a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just two things:
- should it be tested in some way
- remember to add the ansible PR and update the documentation in regards to the modifications of the
config/application.yml
Hmmm, this is not working well, if you check the latest events from ahoy_events table they are without visit_id nor site_id (I'm generating them visiting Getafe staging site). Please review that
|
It's not the same as in contratos Edu?
|
I made a change to not use bounce, and by mistake it was not saving the site correctly for visits with not authenticated users, but the schema of events and method to name them (controller#action) are the same. The only difference is that instead of using an After talking with Victor I am using a different way of associating visits and events that I think can also be useful in contratos: At the moment of enqueuing the job to create the event from the controller there is a current_visit available which is passed to the job |
@entantoencuanto thanks, now ahoy_events are tracking the site_id properly. Would it be possible to add the site_id also to the field ahoy_visits? If we want to give the metric unique visitors to a single site right now it's not possible (please confirm @furilo). |
Yes, that is basic.
|
Yes, it's possible, but currently the same visit can use different site_ids. For example, currently if I change in staging of site from the same browser the visit remains the same. I can investigate if a different visit can be generated for each site Or may I do the same as I did with the user_id field, I can update the site_id when it changes |
If the same user visits two sites it should be tracked as two visits, because sites should be independent. Customers don't care if the application is multitenant or there are N applications. |
Since a tenant only sees his visits, I don't think it's a problem thats
shared. I would not complicate it
|
This works when Ahoy.cookies is set to false. If cookies are used the methods to track with cookies should be ovewritten. This hack work by using some classes inherited from Ahoy ones which includes site by: * Defining an Ahoy::GobiertoTracker inheriting from Ahoy::Tracker wich includes site in visit_anonimity_set and visitor_anonimity_set methods (used to detect if visit exists previously) * Ovewriting visit and track_visit in Ahoy::Store class to include site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it works as expected!
@entantoencuanto there's something I missed in the acceptance that is broken. Your PR doesn't work when a customer has a google analytics key setup (the first point of your PR description). See that you are removing the |
Closes #4032
✌️ What does this PR do?
GobiertoCommon::EventCreatorJob
to create ahoy events which is used from controller concern for each request🔍 How should this be manually tested?
👀 Screenshots
Before this PR
After this PR
.env.example
?config/application.yml
?config/secrets.yml
?(Changes in these files might need to update the role in Ansible)
📖 Does this PR require updating the documentation?
Pending