I am testing Piwik if it would be suitable for analytics and tracking for my Ruby on Rails application. For testing purposes, I am running piwik on localhost, tracking the rails application running also on localhost. Piwik tracking is integrated by the piwik_analytics gem, and to track goal conversions I am using the piwik-tracker gem. All my goals are manually converted (by calling the goal conversion method from a controller).
My problem is that I wish to record goal conversions by a custom variable (scope: visit), but this does not seem to work. The custom variable is set correctly, and the goals conversions are recorded correctly, but the goal conversions are not sortable by the value of the custom variable.
In my application, there are three different types of users, and I wish to track their actions by user type. To this end, I have defined a custom variable which contains the user type. I have included setting this variable in the piwik_tracking_tag in application.haml.html, because I cannot know the entry page beforehand. I see that the variable is set correctly, because visits are recorded by this variable. The goals, too, are converted correctly.
However, in the goals panel, when I click on the 'By custom variable' option, I see 0 conversions for each different user type.
I am wondering if this is a Piwik issue, and not caused by me. I have also tried (re)setting the custom variable when calling the goal tracking method
piwik.request.custom_variable(1,"Role","user_role").track_goal(1)
but this makes no difference.
@marflar: We switched to client-side tracking (and updated Piwik to a version they released after I posted this quesiton), and then viewing by custom variable started working. However, Piwik randomly didn't manage to track some goals, so in the end we ditched Piwik and went for Mixpanel, which we've been content with.