For years I have used setuserid and access it via segment=pageUrl=<a class='mention' href='https://github.com/3A'>@3A</a>-F8-DB-79-C8-D2
:
I use the default code:
<?php
$userId = '3A-F8-DB-79-C8-D2';
if (isset($userId)) {
echo sprintf("_paq.push(['setUserId', '%s']);", $userId);
}
?>
That works as expected when clicking the profile ID.
For all old sites this link works:
/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=Live&actionToWidgetize=getVisitorProfilePopup&idSite=30&period=range&date=last7&widget=1&
segment=pageUrl=@userID&token_auth=ed0cd953cbddaa5da2a2bfd6
Now the Issue:
For any NEW sites clicking on profile does work but going to the above link now shows a server 500 error. And I get the matomo error:
An error occurred
Visitor could not be found
Yet the ID is listed in the UserID section and all previous sites still work, it's only happening on any new site!
Any idea how to debug?
Hi @ozrouter.
I'm not able to follow you completely. The segment pageUrl=<a class='mention' href='https://github.com/3A'>@3A</a>-F8-DB-79-C8-D2
might be valid, but why should you check for a userid within the page url? I guess you should more likely use a segment like userId==3A-F8-DB-79-C8-D2
to search for a specific user id.
oh OMG.
I had forgotten why I was using pageURL. userID works now thanks!