Add ability so send arbitrary params on track('...')
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¶m2=value
What do you think of it?
I like it. PR welcome ;)
@sindresorhus Will do after (and base on) #4 ;)
:baby_chick:
@sindresorhus A bit busy for the last few weeks
No problem, just thought I would ping in case you forgot ;)
ping
@sindresorhus Sorry guys, no time for this now =( Shall I close or we could leave it for now as is?
leave it
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'
});
@arikon ?
@sindresorhus Still have no time for this. Feel free to close it if needed.
@arikon the ? was to the above question, not to implement this.
@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.
Thanks guys. Now that I understand GA better, custom dim / metrics should be easy to implement.
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)