Mixing data from different domains

Hello Everybody :slight_smile:

I am nonitoring few websites from one installation of Piwick.

When I select to monitor website “A”, in section “Visitors in Real Time” shows data for website “B”.

Is this “normal”? or I can setup somehow to show details from only one website;

or alternatively, must I have different installations of Piwik to be able to monitor each website “clean”?

Best regards
Srdjan

It is because you put the wrong code on your pages, double check the codes are right especially the numeric piwik id

Hello Matt,
Thanks for the reply :slight_smile:

I did not get you there, I put exactly same code on all websites, are they supposed to be different?

Yes, they are supposed to be different, let’s see an example-snippet:

var piwikTracker = Piwik.getTracker(pkBaseURL + “piwik.php”, 1);

As you want to track different sites on the same Piwik-isntallation, please go to Settings=>Websites and add new websites there. Click on “Show tracking-code” to get the specific tracking code for your specific website. You’ll see the difference in the tracking code :wink: In the example above the digit “1” would differ.

So long,
A.Kalkhoff

:)-D

A.Kalkhoff , Thank you sooooooooooo much!

It is such a small thing, but makes such a huge difference. To unexperienced eye :frowning: it looks the same.

Thanks a lot!

Best regards
Srdjan

:S Unfortunately, still shows actually oposite “Real time results” even after I changed code. Maybe it is not all that bad…

The question here will be does Piwik stores old results/information of visitors, in that case soon I will be seeing only correct results?

If that is true, is there a way to delete those results, so they don’t confuse big picture?

Best regards
Srdjan

All past tracking remains unchanged in your database. All new data should be processed correctly.
Basicly you could delete all data of the Piwik-tables as it still is a fresh installation.

If you intend to keep the correct data that was processed already, you would need to clear following tables to the point you adjusted your tracking-code:
piwik_log_conversion,
piwik_log_link_visit_action,
piwik_log_visit,
piwik_log_conversion_item,
piwik_log_action

As well as the data from the dabase numeric archive tables (archive_numeric_) and blob archive tables (archive_blob_).

Piwik basicly never deletes any old information. You could tell Piwik to do so, but by default it does not.

So long,
A.Kalkhoff

A.Kalkhoff,

Thanks a lot. It really helps if I understand what is happening.

I suppose those few initial data does not matter much, in few weeks time all will be replaced burryed by new data.

Best regards
Srdjan

Hi piwikteam,

How do I prevent that a website admin configure the wrong website id in his java tag and write the statistics in an other website by accident.
If I provide a piwik installation for different customers it would be very useful to prevent they from writing stats in the other stats.

Regards,
André

Its a human error thing really. Once the code for each site is defined as long as they dont do custom recoding to put another domain in their code it should be fine.

When people copy paste from the source of one web site and try and retrofit it for another site then thats where you can get data pollution.

Just ensure they use the code from within the admin section of piwik and they should be good.

good luck