I have a as to how google's async analytics tracker works. The following code is used to init a command array:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(
['_setAccount', 'UA-xxxxxxxx-x'],
['_trackPageview']
);
</script>
Now, this is a standard array that gets replaced once the GA's code is loaded and is used as a sort of queue that stores your clicks.
My confusion lies in wondering how these clicks could possibly be persisted if a user clicks a link that causes a reload (prior to the GA javascript being loaded). If the GA code hasn't captured that push on the the _gaq object, then the user clicks a link and goes to a new page, this array is just re initialized each time no?
Isn't it true that a javascript variable will not persist across requests that cause a refresh? If this is the case, haven't we then lost that original click that caused the page reload?
Any explanation is greatly appreciated.