Google Analytics Import arbeitet nicht

Guten Morgen zusammen,

ich habe gestern den Google Analytics Import eingerichtet, wie in der Matomo-Anleitung beschrieben. Die Einrichtung des OAuth Client ging einfach, ebenso das Anlegen des Jobs in der Admin-Oberfläche.

In der Liste der Import Jobs sehe ich den auch. Status wird als “started” angezeigt, Last Day Importet und Last Day Archived zeigen ein “-”, Import Start Time das Datum und die Uhrzeit der Einrichtung gestern (Last Resume… ebenfalls), Time finished zeigt “Estimated finish in unbekannt days”.

Irgendwie passiert da weiter nichts.

Im tmp-Verzeichnis von Matomo finde ich eine gaimportlog Datei. Darin befindet sich ein Eintrag, offensichtlich heute Nacht um 1 Uhr irgendwas angelegt:

“nohup: failed to run command ‘php’: No such file or directory”

Was mache ich falsch?

LG Thomas

PS: Hoster ist Alfahosting, falls das eine Rolle spielt.

Hallo,

Das klingt ganz leicht nach einem Problem, dass vor ein paar Tagen in 1.0.4 behoben wurde.

Kannst du nachschauen, ob du die neueste Version installiert hast?

Hallo Lukas,

lt. Marktplace-Seite habe ich Version 1.0.5 installiert, vom 12.11.2019.

LG Thomas

1 Like

Hallo, ich habe das gleiche Problem.
Alles angelegt und Import gestartet, doch es tut sich nichts. Log-Dateien sind angelegt, haben aber 0 KB und keinen Eintrag! Die Version vom Analytics Importer ist 1.0.6

Über SSH funktioniert es

Kennt jemand die Funktionsweise - wird das über einen Cronjob geregelt, oder über einen Anstoß über den aktuellen Zufluss von Daten? Denn die aktive Datenerfassung ist nicht gestartet, da erst die Altdaten importiert werden sollen.

EDIT:
If i try this, i got an Error:

Edit2:
I don´t know, but if i enter:

./console core:run-scheduled-tasks 'Piwik\Plugins\GoogleAnalyticsImporter\Tasks.resumeScheduledImports'

The Error was:

[Exception]
  Task Piwik\Plugins\GoogleAnalyticsImporter\Tasks_resumeScheduledImports not found
  Available tasks:

The difference ist:
Tasks.resumeScheduledImports
Tasks_resumeScheduledImports

Bei mir selbes Verhalten unter Analytics Importer 1.0.6. Nach Update auf 1.1.0 bislang keine Verbesserung.
Im log steht an letzter Stelle “Scheduled tasks are disabled with --disable-scheduled-tasks”. Wie kann ich diese aktivieren bzw. ist dies dafür relevant?

The last log line is not relevant here. The importer launches archiving after importing so the new data is available, and in that run we don’t want to run scheduled tasks. Scheduled tasks should be run with the core:archive command that should be setup as a cron command. You can use the TasksTimetable plugin (Tasks Timetable - Matomo Plugins Marketplace) to inspect tasks and you can check the output of the core:archive command (the one run through cron) to see if it is being run correctly.

The issue with core:run-scheduled-tasks seems unrelated to Matomo, I suspect it has something to do with the PHP executable being used as something is replacing the ‘.’ with an underscore. I would check that the PHP being used is the CLI PHP executable (as opposed to php-fcgi or something else). If that still doesn’t work, we could maybe test whether the text replacement happens with just a normal php file or if there indeed is something in Matomo that’s doing the replacing.

I’ll probably add some docs to the user guide for troubleshooting task related problems.

1 Like

After i switch to an own server, all works fine with the new Version