Pulling Goal Data from API

I want to be able to pull goal conversion rate and completion data using the API.

So far I have created the following request:

https://mysite.com?module=API&method=Goals.getGoals&idSite=1&idgoal=8&period=day&date=yesterday&format=Tsv&token_auth=mytoken

I was expecting this to pull the conversion data for goal 8 site 1

However - it returns a table of all the goals metrics but with blank data

Ultimately I would like to be able to pull all goal data using python or R and then do further analysis etc.

One final question are there any integrations with Google Sheets or Excel?

I was expecting this to pull the conversion data for goal 8 site 1

For this you can use the real time API: Real Time Analytics - Analytics Platform - Matomo

And to only get results for Goal 8 you can use segmentation with the Segmentation: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3
in particular the segment: visitConvertedGoalId Visit converted a specific Goal Id

Hi,

Will the Live API module only fetch data from the latest x minutes?