Google Import Export - Fails to get me data for few imported posts

HI All,
I have issues with the https://plugins.matomo.org/GoogleAnalyticsImporter

I have a site registered in Matomo for which I have imported data from GoogleAnalyticsImporter

The issues are as follows:

  1. We display Total Views for a given post for which we invoke the Actions.getPageUrl Matomo API

When I specify a specific date eg : 2021-03-29 - I get 3 nb_hits but if I add a date range from 2019-11-12 to 2021-03-30 I get zero - API should have atleast returned 3 as the above mentioned date is well within the date range.

  1. What are the reasons where some URL is being imported (as i can see it listed in Behavior -> Pages) but data is not being imported properly ?

  2. Few POST URL’s are not being imported by Google Importer and hence their Total Views = 0 ? What reasons would have caused skipping such URL’s ?

  3. How can I query the database (which tables) to find missing imports ?

Hi @Gsanil, sorry you’re experiencing this problem, can you see data in week and month periods?

Do you have any INI settings that force disable browser archiving for range periods?

What are the reasons where some URL is being imported (as i can see it listed in Behavior -> Pages) but data is not being imported properly ?

Can you post an example of the URL that is not being imported properly? How many different URLs total are there in your site?

I verified the config.ini.php file and it has ONLY DB settings and Enabled Plugin List - nothing related to browser archiving or caching.

We have an on-premise setup and for the below URL I see data for a s

I get data for this range as mentioned below: 16th Dec 2019 to 18th March 2021

https://analytics.sophiamedia.com/?module=API&method=Actions.getPageUrl&pageUrl=https://healthimpactnews.com/2019/study-water-fluoridation-linked-to-lower-iq-in-children/&idSite=4&period=range&date=2019-12-16,2021-03-18&format=JSON&token_auth=sometoken

However, I do not get response for the date range : 16th Dec 2019 to any date beyond 18th March 2021

https://analytics.sophiamedia.com/?module=API&method=Actions.getPageUrl&pageUrl=https://healthimpactnews.com/2019/study-water-fluoridation-linked-to-lower-iq-in-children/&idSite=4&period=range&date=2019-12-16,2021-03-28&format=JSON&token_auth=sometoken

It should have returned me the previous response atleast. Not making sense to me. I hope you can help me figure out the issue.

Also I observed a few of the URL’s are not imported at all. The import was successful but a few URL’s from that IMPORT date range were skipped by Google Importer plugin. Not sure why ? And it was never reported. Is there a way where the plugin LOGS Failed / Missed / Skipped Imported URL’s ?

@diosmosis Any updates on this one please ?

Hi @gsanil, if you’re seeing data for some ranges but not all, then it’s possible the other ranges are not being archived. Can you run the following SQL and post the result:

SELECT idarchive FROM archive_numeric_2019_12 where name = 'done' and idsite = 4 and date1 = '2019-12-16' and date2 = '2021-03-28' and period = 5;

?

Then using that idarchive, run:

SELECT * FROM archive_numeric_2019_12 where name = 'nb_visits' and idarchive = ?

?

Also I observed a few of the URL’s are not imported at all. The import was successful but a few URL’s from that IMPORT date range were skipped by Google Importer plugin. Not sure why ? And it was never reported. Is there a way where the plugin LOGS Failed / Missed / Skipped Imported URL’s ?

The plugin will log to /path/to/matomo/tmp/logs/gaimportlog.{idSite}.log files. To see if any URL entries weren’t recognizable you’ll have to enable verbose logging when starting the import (there is a checkbox in the UI). There will be a lot of information to sort through. It would probably be useful to start a new import for a single day where a URL is missing and look through the output.

@diosmosis Thanks for your response. Unfortunately, the first query you typed gives me an EMPTY Set.
So could not fire second query. Also, can you please share what you were trying to figure out by asking me to fire these queries? That way I know for my future reference as well. Thanks !

Matomo stores report data in the archive tables. The status of each “archive” is in a row in the archive_numeric table with a name LIKE 'done%'. The first query was looking for the archive for the range that was displaying no data. If you couldn’t find an idarchive, then it means the processing of the report data is never initiated (contrast to finding it, but finding with no report data or with old report data that was never updated). If you have browser archiving for ranges enabled, you should be able to visit a range and have it process the reports if not already processed, then display it.

I would try the following:

  • check that the archiving_range_force_on_browser_request INI config is set to 1
  • see if this happens for other sites or just the GA import site
  • see if this problem is limited to some ranges or affects other periods such as weeks, months, years. (numeric values for these types of periods are 2 for weeks, 3 for months, 4 for years. the 5 in the original query is for range periods)