Is it possible to get the following information about the current visitor using Google Analytics API with JavaScript?
You should be able to get it all from the cookies set by Google Analytics. They are stored as first party cookies so JavaScript running on a page will be able to read them. The number of visits can be obtained from the last part of the __utma
cookie and the referrer can be taken from __utmz
. The source is the utmcsr
bit of __utmz
while the medium comes from utmcmd
and the keyword is utmctr
.