CSV export URL to Google Sheet


I’m trying to import an CSV URL into a Google Sheet so I can make a DataStudio dashboard. Unfortunately the import isn’t formatted right. Numbers are formatted as textfields and this isn’t something I can change easily because of the way the numbers are imported. They show up in Google Sheet like this:


Any one has a clue how I can import is so only the numbers are in the sheet not the ? characters splitting every individual number?

BR Mook


This is a fun topic :slight_smile:

I explained the reason for this here:

TLDR: Excel expects files to be in a very weird format (UTF-16 with a BOM) or refuses to read them. As most Matomo users will want to open the CSVs in Excel, Matomo creates its CSV files in this format, but this is incomprehensible to Google Sheet.
The solution is to add &convertToUnicode=0 to the API request so that Matomo returns “normal” text files.

Thanks! This worked. Unfortunately I’m not able to catch approximately 400 days of data out of Matomo. Every time I receive the following error:

Exception: Request failed for https://xxxxx.com returned code 500. Truncated server response: Matomo encountered an error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) (which lead to: Allowed memory size ... (use muteHttpExceptions option to examine full response)