Error User ID replace

I have a problem with the tracking.
I am recording the tracking of users with javascript and everything works fine, but when the user registers, I want to set as the userid the email that was logged in my platform.
To use the setUserId () API function, passing the email as setUserId (‘hp@yahoo.es’) parameter.
But Piwik plays me as a new user.
I want the previous entries will associate the user hp@yahoo.es but can not.
The php code is
$tracking->setVisitorId($tracking->getVisitorId()); $tracking->setUserId('hp@yahoo.es'); $tracking->doTrackPageView('New Login');

1 Like