Inconsistent Statistics

Scenario:

Piwik configured with two sites: Site A represents the general tracking for the whole site with the JS hook being injected into every page. Site B represents specific tracking of specific pages which is always called with custom variables included.

For viewing a page where specific is tracking, two sets of JavaScript data are inserted, for both A & B, with their respective siteIds etc.

The issue is that site B should always register the same amount of hits on page x as site A anyway, irrespective of segmentation, but it does not. There is a variance consistently. Furthermore, when querying the API against site B using the exact parameters as would be used to save the data for page x, the values vary once again. For example, the page views for one day across the 3 sources is as follows:

Site A: 13494
Site B (Overall): 13143
Site B (API + segmentation): 13353

As far as our system is concerned, there should be no difference. Timeout is a possibility but then, the target is the same server, therefore if one trigger activates the other should also.

Is this something that is known with Piwik? Perhaps you could give some insight as to where the problem exists?

Kind regards,
Matt

If 2 codes on the same page, often the second code will count less visits. Maybe this is the problem?