nix-wie-weg / ga_events Goto Github PK
View Code? Open in Web Editor NEWGoogle Analytics' Event Tracking everywhere in your Rails app
License: MIT License
Google Analytics' Event Tracking everywhere in your Rails app
License: MIT License
We ran into an issue where an empty response body (=> white page for the user) is returned after a controller action which creates an GAEvent (GaEvents::Event.new
) and then redirects to another page.
It seems like this would be in issue in the ga_events
middleware. The curious part is that this has worked without any issues in staging and is not reproducible outside the production environment.
Do you guys have any ideas what could cause this? Maybe some rack caching in production mode or so? We are running on rails 4.0.0. Any help would be appreciated.
It works completely fine in development, however on our live application there is no HTML injection at the bottom of the page. I'm tracking from the controller.
The JS is loading in fine, and I'm able to use GaEvents via the console.
Using ruby 2.1.2, rails 4.1.5 on both dev/prod servers.
Any ideas?
My app is calling the Server side call in a model. Upon item creation in the model we fire the after_created callback to kick off the GA call. Once the item is created in the model we redirect the user to the same page but with a reference to the comment/reply they just left.
On page load the event fires off to GAU just fine. However if you refresh the page or click on a link to leave the page and go else where on the site the event that was just submitted is resubmitted to GAU.
Any suggestion how to get around this? In debugging the middleware.rb file on refresh the call if GaEvents::List.present?
seems to fail so I'm not sure how its inserting the div again.
A CHANGELOG.md
would be nice with a least some superficial information what has changed between versions.
First I have to say that I really like the approach of your gem. It allows you to create events server-side where the actual business logic is happening, without the need of holding up the request to make HTTP request elsewhere and losing all the context information of the client.
However, I tried using the gem for a particular use case where the response of the request is a redirect and from what I see it doesn't work in that case. Or am I missing anything?
Is there maybe a possibility to keep the event information in that case and insert it into the next request? (Maybe the Rails flash could be used for that)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.