Identify a visit via session id


#1

Hi Piwik Community,

Currently I’m evaluating different Web Analytics Solutions for an online portal. Every user has to login and must allow cookies.

The question is:
Will Piwik create it’s own session ids to identify a visit?
Or will Piwik use the user-agent / IP-adress combination to identify a visit?
…or can Piwik use exisiting session IDs which were created by the portal?

It would also be interesting to know if other Web Analytics systems handle this differently

Best Regards


(Matthieu Aubry) #2

Yes Piwik can use custom ID and if not specified will use IP + user agent + other things.


#3

Thanks Matt ,

How to get Session ID and store it for each visit ?.

Session_id() and COOKIE and SESSION are not working …can u help
Regards


(Vijay Poduval) #4

@matthieu Could you please clarify how we can override piwik’s internal logic to determine a visit.
As far as I know, the only way to specify is to store the following information:

  • _idvc - Current visit count.
  • _viewts - Previous visit time stamp
  • _idts - First visit timestamp.

I do not want to keep track of all of this info and send it over for each event and what I want to do instead is to
create a session id manually using the timestamp and mac address and override piwik’s logic for calculating a visit.

Do let me know and I am looking forward to your reply as this is causing me some trouble to get the correct visit count.


(Peterbo) #5

Have a look at the User ID feature: User ID - Analytics Platform - Matomo


(Vijay Poduval) #6

@peterbo Thanks for the reply. But how can ‘UserId’ help me differentiate between visits? What I want is something like a ‘VisitId’ which is more or less like a session id.


(Peterbo) #7

That’s what the userID is made for. Use

_paq.push(['resetUserId']);

when the user ends his visit / logs out. To completely override Matomo’s visit logic, you’ll have to set the visit_standard_length (config) to a very high value (and start / end the UserID visits on your own then).

I don’t know if this will create reasonable statistics, but it possibly will fit your needs.