Quantcast
Channel: Matomo forums - Latest topics
Viewing all articles
Browse latest Browse all 13974

Match userID between 2 websites

$
0
0

@harunt7 wrote:

Hello there,

This is my first post! :hugs: first of all thank you for this wonderfull tracking software!:grinning:

But lets come tot the point! :smiley:

I have 2 websites let’s call it X and Y to make it easy, Website Y is purely informative and it gets hits via google etc …
Website X has a backend where people can log in and make adjustments.

now I get the UserID with these settings( _paq.push([‘setUserId’, ‘USER_ID_HERE’]);.)
This i get from my user who logs in on wesbite X.
I would like to see the user ID on website Y, then I would be able to match this much more easily.

now i read the article:
https://piwik.org/blog/2017/02/complete-guide-tracking-websites-web-apps-multiple-piwiks-easily-efficiently/

if i add this in my tracking script
var u = ‘//$yourPiwikDomain’;
_paq.push([‘addTracker’, u + ‘/piwik.php’, var idSite = Y]); // adds an additional tracker
_paq.push([‘setSiteId’, ‘X’]); // configures your regular Piwik tracker
_paq.push([‘setTrackerUrl’, u + ‘piwik.php’]);

but for this piwik doesn’t work anymore and i recieve this error:
Uncaught SyntaxError: Unexpected token var idSite

Can somebody help me plz?

Greetings

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 13974

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>