Set userid by a click on a link in an emailing, and store it for future visits


Hello good.

First of all congratulate the creators of piwik for this great tool.

I’m using piwik recently and I’m checking its many options.

I send emalings with links to my website. In step one parameter url the user identifier.

As I can associate this id with the id of the visit.

My idea is to recognize visitors in future hearings. As I can do ??

Use SetUserID() on the first visit by emailing.

On subsequent visits I UserdId be automatically recognized? Or I have to store it in a cookie and call SetUserID() on each visit?

It would be better to use custom variables rather than UserID.

Thank you very much and best regards !!

(Matthieu Aubry) #2

Hi there,

Can you please create a feature request on: Issues · matomo-org/piwik · GitHub

i think what we could do, is store the User ID in the cookie, and re-set it on new visits. Currently it wouldn’t do this automatically.



Now create a feature request.

I wanted to use custom variables and storeCustomVariablesInCookie to save this information, but I have seen that the cookie expires in 30 minutes (use SessionCookieTimeout). As I can change the timeout for custom varibles cookies.

If I can not change this time, and would have to create my own cookie and use use_third_party_id_cookie? I’m right?

A greeting!