Our website has its own cookie and session ID and I added that to the log_visit table. I log it as follows:
The site’s homepage (which users are supposed to come back to again and again because we have a lot of AJAX) has a setCustomData(our_id) method which runs every time the page loads.
A custom tracking plugin has a method triggered by newVisitorInformation adds that data to the visitor info array (and it is automatically written to the log_visit table).
But now the piwik cookie gets reset every time I go to the page with the setCustomData(our_session_id). I know because when I click anything I have the same our_session_id and different idvisit and visitor_idcookie. If I don’t setCustomData and do the same clicks it’s counted as one visit (no new entries in the visit table), which is the behaviour I want, except that I would still like to log the session id.
Is this a bug? Is there a work-around?