Set Custom Variable and Display on Visitor Log as Link via Plugin API - Salesforce CRM


I am hoping to develop a Plugin for our Matomo installation that will do the following:

  1. Get all Visitors for time period via > UserId.getUsers - this is simple
  2. Process that data to connect Salesforce CRM users to Matomo Visitors via their UserID - simple via Salesforce API and PHP Libraries
    a) Set data to Salesforce
    b) Pull data from Salesforce (ID)
  3. Set the ID retrieved from Salesforce to the Matomo Vistitors - NOT SURE HOW?
  4. Display the ID on the Matomo Vistitor Log as a Clickable Link that would open the user on Salesforce - NOT SURE HOW

I am hoping for any tips / suggestions on how to do this?


  1. How can I set a Matomo Visitor’s Custom Variable via the Plugin API? Is there a method to do this?
  2. How can I manipulate the Matomo Visitor Log view - to retrieve this Salesforce ID and display it as a link? Is “Live.getExtraVisitorDetails” or “extendVisitorDetails” or another method the best way to go about this?

I appreciate any help. I have looked through alot of the docs but have not been able to find an obvious way to do these.