On page LogAggregator - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3 is this a typo?

while ($row = $query->fetch()) {
$country = $row[‘location_country’];
$numEcommerceSales = $row[Metrics::INDEX_GOAL_NB_CONVERSIONS];
$numVisitsWithEcommerceSales = $row[Metrics::INDEX_GOAL_NB_VISITS_CONVERTED];
$avgTaxForCountry = $country[‘avg_tax’];
$maxShippingForCountry = $country[‘max_shipping’];

// ... do something with aggregated data ...

Should the items in yellow be $country or $row? I would think they should be $row because they are from a select statement. Not sure how $row[‘location_country’] would return back as an array.

Hi @Spherexx, yes that’s a typo, it should be $row. I’ll fix it soon, thanks for pointing it out!