matomo-org / matomo-org/plugin-GoogleAnalyticsImporter
Importer failing - claiming site does not exist
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 29
- Forks
- 16
- Avg merge
- 15h 12m
- Merged PRs (30d)
- 14
Description
I cannot get the importer working, looking at logs this is what I keep getting for every site I try to import (same error, different site number)
ERROR [2023-09-12 23:58:03] 86422 Uncaught exception: /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/plugins/GoogleAnalyticsImporter/Commands/ImportGA4Reports.php(331): Site ID 4 does not exist. [Query: , CLI mode: 1]
[Exception]
Site ID 4 does not exist.
Exception trace:
() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/plugins/GoogleAnalyticsImporter/Commands/ImportGA4Reports.php:331
Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportGA4Reports->getIdSite() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/plugins/GoogleAnalyticsImporter/Commands/ImportGA4Reports.php:81
Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportGA4Reports->executeImpl() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/plugins/GoogleAnalyticsImporter/Commands/ImportGA4Reports.php:57
Piwik\Plugins\GoogleAnalyticsImporter\Commands\ImportGA4Reports->execute() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/core/Console.php:108
Piwik\Console->originDoRun() at n/a:n/a
call_user_func() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/core/Console.php:147
Piwik\Console->Piwik\{closure}() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/core/Access.php:670
Piwik\Access::doAsSuperUser() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/core/Console.php:148
Piwik\Console->doRunImpl() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/core/Console.php:87
Piwik\Console->doRun() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at /var/www/vhosts/missioncontrol.ozmediaservices.com/httpdocs/matomo/console:32
googleanalyticsimporter:import-ga4-reports [--property="..."] [--dates="..."] [--idsite="..."] [--cvar-count="..."] [--skip-archiving] [--mobile-app] [--timezone="..."] [--extra-custom-dimension="..."]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/GoogleAnalyticsImporter/Commands/ImportGA4Reports.php, especially getIdSite() around line 331 and its callers at lines 81, 57, and the documented import-ga4-reports command. Reproduce the failure with the reported --idsite and inspect how the site is looked up. Done means the importer handles the supplied site ID correctly or reports a clear, actionable validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100