Search code examples
ruby-on-railsruby-on-rails-3google-analyticsgabba

Events sent to Google Analytics with Gabba don't have a hostname


I'm using Gabba to send events to Google Analytics from my rails back-end.

When I send events, the "hostname" is not set (in Content > Events > click on an event > set "Second dimension" to hostname).



Here's a simplified version of how I send my events:

gabba ||= Gabba::Gabba.new(Settings.google_analytics.ua_code, "none")
gabba.identify_user(cookies[:__utma], cookies[:__utmz])
gabba.event("Submissions", "submit_for_review")

My question is: where does Google Analytics pick up the hostname from?

I thought it was from the utmz cookie, but it doesn't work.


Solution

  • Try this:

    g = Gabba::Gabba.new("CODE", "mydomain.com")