insight icon indicating copy to clipboard operation
insight copied to clipboard

Add ability so send arbitrary params on track('...')

Open arikon opened this issue 12 years ago • 15 comments

Yandex.Metrica supports urls with arbitrary params, and allows filtering by them. I think GA should also support this.

We could add support of sending such params to the tracking service.

Example:

var insight = Insight( ... );
insight.track('path', 'to', 'page', {
    param1: 'value',
    param2: 'value'
});

This should transform to the following path:

/path/to/page?param1=value&param2=value

What do you think of it?

arikon avatar Jul 24 '13 14:07 arikon

I like it. PR welcome ;)

sindresorhus avatar Jul 24 '13 14:07 sindresorhus

@sindresorhus Will do after (and base on) #4 ;)

arikon avatar Jul 24 '13 15:07 arikon

:baby_chick:

sindresorhus avatar Aug 18 '13 19:08 sindresorhus

@sindresorhus A bit busy for the last few weeks

arikon avatar Aug 20 '13 15:08 arikon

No problem, just thought I would ping in case you forgot ;)

sindresorhus avatar Aug 21 '13 10:08 sindresorhus

ping

sindresorhus avatar Nov 06 '13 15:11 sindresorhus

@sindresorhus Sorry guys, no time for this now =( Shall I close or we could leave it for now as is?

arikon avatar Nov 06 '13 18:11 arikon

leave it

sindresorhus avatar Nov 06 '13 19:11 sindresorhus

Is the point of this to track custom events / funnels? Would custom dimensions & metrics suffice? https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets

e.g. to track OS type

ga('set', {
  'dimension5': 'OSX'
});

rayshan avatar Mar 25 '14 06:03 rayshan

@arikon ?

sindresorhus avatar Aug 27 '14 01:08 sindresorhus

@sindresorhus Still have no time for this. Feel free to close it if needed.

arikon avatar Aug 27 '14 08:08 arikon

@arikon the ? was to the above question, not to implement this.

sindresorhus avatar Aug 27 '14 11:08 sindresorhus

@sindresorhus Oh, I see now =)

@rayshan The point is to track any useful data and generate reports with it. I think custom dimensions & metrics of GA will suffice.

arikon avatar Aug 27 '14 12:08 arikon

Thanks guys. Now that I understand GA better, custom dim / metrics should be easy to implement.

rayshan avatar Aug 27 '14 16:08 rayshan

Hi folks, I just read through the thread and I still don't see how I can use this with .trackEvent(...):

insight.trackEvent('category', 'action', 'label', 42, {
    os: 'Linux', 
    ...
}

I don't see a way to pass the custom dimensions/additional params (the one with the 'os' property)

omefire avatar Apr 28 '16 18:04 omefire