Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let users track Custom Dimensions #82

Closed
tsteur opened this issue Dec 2, 2015 · 5 comments
Closed

Let users track Custom Dimensions #82

tsteur opened this issue Dec 2, 2015 · 5 comments

Comments

@tsteur
Copy link
Member

tsteur commented Dec 2, 2015

In matomo-org/matomo#9129 we created a new plugin to track Custom Dimensions.

To the JavaScript Tracker we added a new method setCustomDimension(int dimensionId, string dimensionValue). This sets a tracking API parameter dimension$dimensionId=$dimensionValue. Eg dimension1=foo or dimension2=bar. So the tracking API parameter starts with dimension followed by the set dimensionId.

I reckon we should be consistent here with the PHP Tracker and clear all set custom dimensions after the next tracking request was sent.
eg

setCustomDimension(1, 'myvalue1')
setCustomDimension(2, 'myvalue2)
trackPageview()
// now dimension 1 and 2 would be cleared and one has to set values again

FYI: Custom Dimensions are similar to Custom Variables. Currently a plugin is needed to use them but in Piwik 3.0 it will be installed by default and at some point we will deprecate Custom Variables (not soon though)

@tsteur
Copy link
Member Author

tsteur commented Dec 3, 2015

BTW: In PHP-Tracker we used a more generic implementation see: https://github.com/piwik/piwik-php-tracker/pull/15/files

It's basically a method setCustomTrackingParameter(parameter, value) that let's you set a dimension like this: setCustomTrackingParameter('dimension1', 'my value'). Also in the future it will let you set any custom tracking parameter for any custom plugin.

@tobz67
Copy link

tobz67 commented Mar 7, 2016

Curious as to the status of custom dimensions for the iOS SDK. The documentation recommends using dimensions over custom variables however this is still listed as an enhancement for the iOS library.

Trying to decide the right path for some additional event tracking meta data. Thank you!

@mattab
Copy link
Member

mattab commented Mar 15, 2016

Hi @tobz67

Maybe you are able to help us here? we would welcome a pull request to add the setCustomTrackingParameter method in the iOS SDK. In general, we welcome your help to maintain and improve our iOS SDK!

@mattab
Copy link
Member

mattab commented Jul 7, 2016

FYI: we the Piwik team are looking for a maintainer for the iOS SDK. if you can help please comment here #91 - we need you!

@brototyp
Copy link
Member

brototyp commented May 7, 2017

There is an open pull request on Custom Dimension tracking. Please add your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants