Ask A Question

Notifications

You’re not receiving notifications from this thread.

integrating analytics

Sean M asked in General

Hi Chris!

I see GoRails is using segment.io for analytics. Could you recommend me a good resource on integrating segment with GA and mixpanel? There are too many approaches like javascript version http://railsapps.github.io/rails-google-analytics.html) OR ruby version https://github.com/segmentio/analytics-ruby OR with some patterns like facade https://robots.thoughtbot.com/segment-io-and-ruby. On the top of these I find the docs incomplete and confusing.

It would be awesome too see a screencast on this topic. I guess most of the guys here are super interested in making sure their app is production ready and this topic would be an important part of it like deploying to production on heroku with puma and deploying sidekiq to heroku episodes. Those episodes are invaluable and personally making me sleep well, since I know my app is configured properly.

The other day I found this http://www.akitaonrails.com/2016/03/22/is-your-rails-app-ready-for-production article. It was scary that I hadn't heard about rack-attack and rack-protection before. These gems have millions of downloads but hard to discover them if you are not an experienced dev. I don't know what are all the crucial steps to make sure your app is production ready, but I'd like to see episodes on it. At the moment as I see (maybe I'm not right) a bunch of guys would benefit from the following, since they have to go thru all of these regardless what kind of app they are tinkering:

  • deploying to production on heroku with puma (already done)
  • deploying sidekiq to heroku (already done)
  • heroku full integration (this is less important since there are good resources out there including the docs)
  • analytics integration (segment + mixpanel + GA; pretty hard to find good resource)
  • intercom.io integration
  • basic security settings/explanation (rack-attack, rack-protection, etc.; pretty hard to find good resource)
  • SSL + DNS config (rack-rewrite, customized domain in case of heroku, etc)
  • basic app performance (loading js libraries, proper SQL queries, indexing, etc.)

Cheers,
Szilard

Reply

Wow, that sounds pretty advanced for me (i'm on the step of making a Rails app google friendly), but definitely i'm going to need to learn what you are doing. So hope you share how you are dealing with it.

Reply

Hey Cesar. What I mentioned above I think are crucial for every production app. If you go thru these for the first time (like me at the moment) you will have hard time figuring out because of the absence of good resources. But as you see most of them are basically just configuration which is pretty much the same in all of the apps. If some experienced coder shares with you his/her best practices in these kinda topics that can help a ton and spare you countless hours. So I hope Chris will make some awesome screencasts to cover these topics.

Reply

Analytics is a super good topic to cover. There's so much of it to take into account with all the tough questions of: Should I track this in the frontend or the backend? What should I call it? How should I save the metadata? How can we design this so it'll be valid data for a long time?

Also this is an awesome list of other production-ready topics. A lot of this is stuff I end up taking for granted, but absolutely needs to be in some screencasts.

Reply

Does anyone have an update on this?
I'd love to see a screencast about how to correctly integrate analytics, segment in particular, properly as I still can't find very good tutorials on it. This is crucial for production apps and we're missing some good tutorials!

Reply

Just for reference, this week's episode is on using Segment for analytics: https://gorails.com/episodes/analytics-with-segment?autoplay=1

Next week I'm also going to cover using the Ahoy gem for those of us who just need to track analytics internal to our apps.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,972+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.