Closed smontgomerie closed 11 years ago
@smontgomerie added you as a contributor, you should be able to push upstream now.
In the meantime that should do - I will add you to rubygems.org too as soon as figure out how (if you have prior experience please let me know) I'm going on vacation in about 14 hours, and I need to sleep between now and then, so i'm a little tight on time :zzz:
Great, thanks! If you have any comments on the code I'd love your feedback. Have a great vacation!
@smontgomerie @leehambley hi guys, looking to use this middleware in a project, but I'd need this PR for event tracking. Is that going to be merged any time soon?
Cheers :)
This pull request cannot be automatically merged.
I've given you commit access, when you've resolved the changes, I'll be happy to push a release to rubygems.org
These commits add fully unit-tested code for adding custom variables and events to google analytics in async mode. Usage is described in the README.
Essentially it allows users to specify custom variables and events in their application controllers. It accomplishes this by adding instance methods to the ActionController::Base class. These methods store data in the environment to pass to rack, and write the variables when rendering the GA javascript tags.
The documentation for Google Analytics tracking requirements is detailed here: https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
Open to discussion on code style. Particularly, I'm not sure I like this syntax:
I might prefer to modify the method to take a hash: