This is my first post! first of all thank you for this wonderfull tracking software!
But lets come tot the point!
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:
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?
Is there nobody that could help me ?
i fixed it:
// We will also collect the website data into Website ID = 7
var websiteIdDuplicate = 7;
// The data will be duplicated into `piwik.example.org/piwik.php`
_paq.push(['addTracker', piwikUrl = u+'piwik.php', websiteIdDuplicate]);
// Your data is now tracked in both website ID 1 and website 7 into your piwik.example.org server!
now after a while i discover that i only track registerd users on my website with the User ID, the “not registerd” users i dont see anymore in the piwik dashboard,
Why i am not tracking everybody ?
I’m new to Piwik, but I saw an option on “Settings > Website > Track visitors across all subdomains”. I think it would solve it for you if you are talking about subdomains, but I’m not sure about different domains.