Visitor Generator plugin, add visits from real logs

Hello Team !

I’m trying to add some new visits to my differents sites using the Visitor Generator plugin, I tried with fake datas but I need datas based on reals visits.

I found this solution :

./console visitorgenerator:generate-visits --idsite=1 --no-fake

In my log file : C:\inetpub\wwwroot\Matomo\tmp\logs\matomo.log the logs are very different than datas in C:\inetpub\wwwroot\Matomo\plugins\VisitorGenerator\data. (I tried to put matomo logs in this folder and run --no-fake but it doesn’t generate any visit)

So I really need your help :smiley:

Thanks in advance



You are not supposed to use the Matomo log, but the access log of the webserver of your website (so apache or nginx logs)

See below.

How can I find these logs ?


That depends on how you set up your webserver (the one hosting your website, not the one hosting Matomo). E.g. if you are using nginx on Debian or Ubuntu you can find them at /var/log/nginx/access.log

Sorry, I misremembered how that feature works. You are supposed to use the access log of the Matomo server (so the one containing the matomo.php?something requests), not of the tracked website

Ok thanks I’ll try to find this. . .

Our matomo server is on a IIS server, so the logs format is not the same . . . and it doesn’t work…

2020-09-01 12:27:20 GET /matomo.php?action_name=hello&idsite=8400&rec=1&r=169694&h=14&m=27&s=20&url=http%3A%2F%2Fplv4-dev05%3A1000%2F_layouts%2F15%2Fbar%2Ffoor.aspx&urlref=http%3A%2F%2Fplv4-dev05%3A1000%2F_layouts%2F15%2Fbar%foo.aspx&_id=f32e1b7334aee14e&_idts=1596023892&_idvc=49&_idn=0&_refts=0&_viewts=1598950883&send_image=1&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=0&java=0&gears=0&ag=0&cookie=1&res=1504x963&dimension1=Centrale&gt_ms=292&pv_id=Cu72zf 443 - Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/84.0.4147.135+Safari/537.36 http://plv4-dev05:1000/_layouts/15/foo.aspx 200 0 0 393

Instead of this kind of log :

- - - [29/May/2011:06:18:38 +0200] "GET /matomo.php?idsite=1&rec=1&apiv=1&rand=1636495582&_id=e4002ba0f2c2dd70&fla=1&java=1&dir=0&qt=0&realp=0&pdf=0&wma=0&gears=0&ag=0&h=12&m=34&s=6&res=1024x768&cookie=1&_cvar=%7B%225%22%3A%5B%22VisitorType%22%2C%22NewLoggedOut%22%5D%7D&cvar=%7B%223%22%3A%5B%22_pks%22%2C%22SKU2%22%5D%2C%224%22%3A%5B%22_pkn%22%2C%22PRODUCT+name%22%5D%2C%225%22%3A%5B%22_pkc%22%2C%22Electronics+%26+Cameras%22%5D%7D& HTTP/1.1" 200 43 ",76977" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1"

If someone have an idea to “format” my logs…