Combine user (website visitors) identities matomo and forum users (xenforo)

This is my first question on this forum and I am also considering myself a newbie in web analytics.
I would like to verify how complex is to achieve the following solution.

I have Typo3 CMS based site with forum which is based on Xenforo.
Both are within a single domain.
I would like to track forum users on CMS sites (record chain of actions they perform while reading the articles from CMS as well as other forum threads)
Not all CMS readers are forum users
Lot’s of forum users won’t login and view articles

That brings me to the main question: How to combine user (website visitors) identities from Matomo database with forum user identities?

Please do not treat this question specific to Typo3 and Xenforo. I would like to ask a general way of solving such requirement and how much development would be required or maybe Matomo has such functionality out-of-the-box.

Hi,

If you want to uniquely identify (logged in) users in Matomo, you can use User ID (while keeping in mind all privacy implications this has).

If you just want to track visitors between two subdomains, then this is probably more helpful:
https://developer.matomo.org/guides/tracking-javascript-guide#tracking-your-visitors-across-multiple-domain-names-in-the-same-website

Hi,

Thanks. I will read about User ID functionality.

In terms of privacy and GDPR, we need to have users approvals before we start tracking their actions on the website. Can Matomo also support this part e.g. manage approvals and check who can be tracked?

https://developer.matomo.org/guides/tracking-javascript-guide#asking-for-consent