Create piwik cookies on a redirect

Hello!

I have a system that makes a redirect, I need to create piwik cookies(user hash, userid, etc) on this redirect.
Is it possible to create those cookies server side without loading piwik javascript code?

Thanks!

Hi,
Interesting, I have no idea, but it could be interesting to test.
So your wish is, I have a web page, with no Piwik js on it, someone click on a link on the page, then he is redirected to a third party website but by clicking on the link a cookie got installed, am I right?
If the answer is yes, I can already told you that I think it is possible to track the redirect, I did an example here: https://www.youtube.com/watch?v=bYly4q6VOkA
regarding the cookies part:
https://developer.piwik.org/api-reference/tracking-api

https://developer.piwik.org/api-reference/PHP-Piwik-Tracker#enablecookies

it seems that it is possible. The biggest thing for me is to have an example in mind. Could you please tell me the scenario you are thinking about? it will help me think about creating one and explaining to others.

Hi!
First thing, thanks for your reply.

My case is:
I will send an email to a known user(I have his e-mail, thats my identifier), this link is to a script that register that click, than redirects the user to the actual URL.
On this same script(that I tracked the click) I would like to set the piwik cookies(including the third-party cookie “pk_uid”).

Sorry for the late response.

Better use the campaign feature for this: Tracking Campaigns – Analytics Piwik - Analytics Platform - Piwik