matomo-org / matomo-org/plugin-GoogleAnalyticsImporter

Missing page views due to page size limit defaulting to 1000

Open
#337 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
29
Forks
16
Avg merge
15h 12m
Merged PRs (30d)
14

Description

Finding that matomo is massivly under reporting compared to GA. Found that if I do a export of the page URLs from mataomo there always seems to be a maximum of 1000 unique pages, but in analytics we have 20k unique page urls for that same day.

I have done some checking of the analytics API and done some quick testing and it appears the reporting API defaults to a page size of 1000 results. I made a quick modification in the following file `Google\GoogleQueryObjectFactory.php` after line 58 I added `$request->setPageSize(100000);` and did a quick import and can now see its pulling all unique url page views through.

However it only gets a couple days, maybe a months of data before it crashes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Google\GoogleQueryObjectFactory.php, where the issue reports adding setPageSize(100000) after line 58, and reproduce an import covering more than a few days. Investigate the reported crash after importing longer periods and verify that all page URLs are imported without the 1000-result limit or the crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.