Custom Variables being overwritten

Hi there,

I’m having an issue and would like to hear how I should approach this.

I’m using the php tracker to track certain actions being taken on the website. What I’ve realised now is that when a user takes two actions, the custom variable is sent to piwik twice, where the second one overwrites the first one. However, I would like to have a full set of the values that the custom variables were, without it being overwritten. How do I do that?

Your assistance will be greatly appreciated!

Thank you in advance,
Johan Hattingh

Just to give some context as well.

The application I am working on is a ‘sidebar’ that can be plugged into any existing website. The plugin is implemented in Angular.

I would like to trace the activities of the users within this ‘sidebar’, which can switch between routes in Angular without actually changing the host page. I would like to track the activities of the users, without capturing each route as a separate page view, as the host page load should be considered a page view.

Is custom variables the right thing to use for this in Piwik? Or is there something else that can be better utilised? I’d also like to be able to afterwards see what routes in the sidebar was opened from which url, and the transition between the routes. Is something like that possible?

Thank you in advance,
Johan

Are you setting the scope for the variable as visit or page?