Analytics Import (GA4) get's killed saying SITE-ID doesn't exist

Hey there,

I’m relatively new to matomo, although I’ve tested it on a personal Blog for about half a year, I didn’t touch it too deep yet. However, yesterday I wanted to import Google-Analytics Data from another site and I really wasn’t able to do that. The Process get’s killed every Time I run it and the logs are saying, that this site-id doesn’t exist.

In Matomo the website get’s created as expected with exactly that ID the log is complaining that is not existing. Matomo also recognizes the google Analytics Property perfectly fine, everything seems to work fine, expect that the Site-ID doesn’t seem to be queryable by matomo. I have retried the process now for about 24 hours (thought maybe some kind of db-caching could cause that), but always with the same results - killed after a few minutes.

Did anyone faced a similar issue and can help me? I’m using a shared plesk-hosting from netcup, if that’s from intereset!

The log says the following (replaced my domain with

ERROR [2022-10-18 06:17:47] 4168979  Uncaught exception: /var/www/vhosts/ Site ID 8 does not exist. [Query: , CLI mode: 1]

  Site ID 8 does not exist.  

Exception trace:
 () at /var/www/vhosts/
 Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportGA4Reports->getIdSite() at /var/www/vhosts/
 Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportGA4Reports->executeImpl() at /var/www/vhosts/
 Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportGA4Reports->execute() at /var/www/vhosts/
 Symfony\Component\Console\Command\Command->run() at /var/www/vhosts/
 Symfony\Component\Console\Application->doRunCommand() at /var/www/vhosts/
 Symfony\Component\Console\Application->doRun() at n/a:n/a
 call_user_func() at /var/www/vhosts/
 Piwik\Console->Piwik\{closure}() at /var/www/vhosts/
 Piwik\Access::doAsSuperUser() at /var/www/vhosts/
 Piwik\Console->doRunImpl() at /var/www/vhosts/
 Piwik\Console->doRun() at /var/www/vhosts/
 Symfony\Component\Console\Application->run() at /var/www/vhosts/

googleanalyticsimporter:import-ga4-reports [--property="..."] [--dates="..."] [--idsite="..."] [--cvar-count="..."] [--skip-archiving] [--mobile-app] [--timezone="..."] [--extra-custom-dimension="..."]

Thanks in Advance for your help!

What are your versions of Matomo and Google Analytics importer plugin?

Hey Philippe,
should be on the latest version:
Matomo-Version: 4.12.0
Analytics: * Version: 4.3.4

It seems to be a bug in the GA importer…
You may then create a bug in the GitHub repo: