1

I'm looking for a method to export every unique visitor from Google Analytics. So, a visitor could open a website for multiple times, I would like to export a single row with some information about the visits like mean time on the website, number of purchases, mean order amount etc.

Thanks in advance.

Stefan
  • 249
  • 5
  • 17
  • [Scitylana](https://www.scitylana.com) can do this for you. It extracts every click/hit from every visitor into .txt files on your disk - automatically everyday. – Michael Frost Billing Sep 07 '16 at 08:56

1 Answers1

0

Stefan, I would suggest using customVariables for this.

Just make sure that you put this code before calling _trackPageview.

_gaq.push(['_setCustomVar',
      1,               // This custom var is set to slot #1.  
      'VisitorID',     // Name of your CustomVar that will show up in Reports
      '123456789',     // ID of your visitors, you need to set this.
      1                // Set the scope to visitor-level.
   ]);

The tricky part could be using actually getting the visitor ID on consistent basis. One of the ways to go is to actually use the same Visitor ID as Google Analytics stores in _utma cookie (details in this article).

The complete code to get it done this way would be following:

var a = uGC(document.cookie, '__utma=', ';');
var id = a.split(".")
_gaq.push(['_setCustomVar',  1, 'VisitorID', id[1], 1]);

After that, you can build custom report with the VisitorID as the main dimension and select any metrics you would like to see. Just make you use the correct and logical combination of dimensions/metrics to get numbers that actually make sense (see this brilliant article by Avinash Kaushik).

Petr Havlik
  • 3,307
  • 1
  • 19
  • 17
  • This is the way I have installed it right now, but i thought there will be an easier solution for it. But it isn't. I will accept your answer. – Stefan Oct 01 '13 at 10:13
  • One more suggestion though -- with Universal Analytics coming, try switching to custom dimensions and using getter for UserID (in GA terminology, this is actually client-id generated by Analytics): https://developers.google.com/analytics/devguides/collection/analyticsjs/domains#getClientId – Petr Havlik Oct 01 '13 at 10:34