lyl0o0o
lyl0o0o

Reputation: 420

How can I link my customers with ganalytics visitor

Most of my website traffic come from adwords, and fill a form to get called.

When A user fill a form, I have a customer created on my database.

For my business strategy, I want to know how much I payed for that lead, and how much benefit I make with it after the call.

For that I think I have to link analytics visitors and my customers directly.

I am searching for a way to put an analytics visitor ID on the request form or something like this...

Upvotes: 0

Views: 96

Answers (2)

Ruslan Konygin
Ruslan Konygin

Reputation: 1019

The best strategy in your case is:

  1. Get user ID from GA or UA(as desribed advisor above)
  2. Send user ID to database
  3. Set up user ID as custom variable(in Googl Analytics) or custom dimension(in Universal Analytics)
  4. Set up custom reports, where you can segment your visitors by their ID's

Upvotes: 0

Nick Blexrud
Nick Blexrud

Reputation: 9603

You would need to get the visitor id and pass it into either a custom variable (ga.js) or custom dimension (analytics.js).

To get the visitor id for Google Analytics (ga.js) *I got this code from How to obtain Google Analytics visitor unique id? SO Answer:

_gaq.push(function(){
  var tracker = _gat._getTrackers()[0];
  var visit_code = tracker._visitCode();

  console.log(visit_code);
});

To get the visitor id for Universal Analytics (analytics.js) *More documentation on this in Google's documentation:

ga(function(tracker) {
  var clientId = tracker.get('clientId');
});

I've used this before, too:

ga.getAll()[0].get('clientId');

Upvotes: 0

Related Questions