问题
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.
回答1:
Try this:
g = Gabba::Gabba.new("CODE", "mydomain.com")
来源:https://stackoverflow.com/questions/13420285/events-sent-to-google-analytics-with-gabba-dont-have-a-hostname