Hi,
This problem is solved.
Instead of "network activate", I have activated WP-Piwik individually for each site and then I have changed the site setting to be the main site for the sub-site. Now they both (main site and sub site) have the same site ID in the tracking code.
Hope this helps to someone else, too.