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

倾然丶 夕夏残阳落幕 提交于 2019-12-12 03:56:49

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!