How to import specific url with the python script?

Hello guys,

I have a problem when i am parsing with the import_logs.py script in a global log.
I created 4 differents sites (ex : foo.bar/foo, foo.bar/bar, foo.bar/foobar, foo.bar/barfoo), that mean in piwik i have 4 different ID.
All of them are logging in the same log (foo.bar.log) but when i want to parse the log everything in the log is parsed.

in fact when i parse the log i need to parse the specific url :
when importing logs foo.bar.log for ID 1 i only need the info from foo.bar/foo
when importing logs foo.bar.log for ID 2 i only need the info from foo.bar/bar
Etc…
Actually when i am importing the foo.bar.log it’s importing all the resquests instead of specified sub-sites (that mean all my 4 sites have the same stats but they should not).

Is it possible to just import one of the sub-sites (foo.bar/foo for example) instead of the logs from all 4 sub-sites together ?

Velborg

Try to play with the files to create 4 different log files (some CLI tools may help here, such as grep). Then run the log import process separately with forced site ID.