Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are sending the IP adress as a client id, which is wrong. For one, the client id is supposed <a href="http://en.wikipedia.org/wiki/Universally_unique_identifier" rel="nofollow">to be an UUID</a>. Secondly, Analytics won't recognize that these events belong to an existing user. </p> <p>You'd need to grab the existing client id for an existing user on the web page:</p> <pre><code>ga(function(tracker) { var clientId = tracker.get('clientId'); }); </code></pre> <p>and then send it back to the server and use it in your request (1). At the moment GA cannot assign correct geo information since the events do not belong to the session of the user who initiates the event (this quite possibly affects some other metrics, too).</p> <p>(1) You might as well read the GA cookie in PHP, but Google recommends against it since the cookie format might change without notice. The script above will always return a correct client id even if the cookie format changes.</p> <p>Updated: I have read a bit more documentation and while my answer seems still somewhat relevant it's probably wrong for the actual use case - Geo is determined by IP and the serverside script will still send the servers IP. So quite possibly (haven't done the science yet) this would look like one visitor with two devices instead of a single visitor.</p> <p>Update 2: Apparently it is now possible to include the users IP adress as parameter, so this answer is possibly no longer relevant.</p> <p><a href="http://techpad.co.uk/mobile/content.php?sid=248" rel="nofollow">Here is a techopad presentation about mixing UA client- and serverside</a>, maybe that helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload