Error message activating GA import

After activating the OAth keys in Google Analytics import, I received the following message;

WARNING: /var/www/s.zed1.com/htdocs/plugins/GoogleAnalyticsImporter/vendor/google/apiclient/src/Google/Service/Resource.php(297): Deprecated - implode(): Passing glue string after array is deprecated. Swap the parameters - Matomo 3.13.2 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) (Module: GoogleAnalyticsImporter, Action: processAuthCode, In CLI mode: false)

Hi,

I am going to guess that you are using PHP 7.4 which now complains about this programming error.

This has been fixed by google in https://github.com/googleapis/google-api-php-client/pull/1683 so only the plugin needs to update the dependencies.

1 Like

Thanks for the quick reply. I’ll wait for the plugin to be updated. I’ll only see it when I connect a new site, it’s only a warning so I’m not too worried…

PHP doesn’t make it sound like a warning:

"Implode with historical parameter order

Passing parameters to implode() in reverse order is deprecated, use implode($glue, $parts) instead of implode($parts, $glue)."

Can somebody confirm this doesn’t affect the imported data?

Meanwhile, I opted to fix the error by swapping the parameters myself:

File:
[matomo folder]/plugins/GoogleAnalyticsImporter/vendor/google/apiclient/src/Google/Service/Resource.php

Parameters to swap, see Fix order of arguments for implode in Google_Service_Resource by swissspidy · Pull Request #1683 · googleapis/google-api-php-client · GitHub

GoogleAnalyticsImporter 1.4.0 is released with “Update google API client for PHP 7.4 support.”