Derek Joseph Olson
Derek Joseph Olson

Reputation: 778

Is it possible to get Google Analytic goal value by date?

Google Analytics Management API goals endpoint. this is the link showing the goal endpoint I will be using to get a value. Is it possible for me to get the goal value broken up by date? I want to know the goal value for each day so I can create a line graph with accurate data. This endpoint is apart of the management API, but I know the core reporting API is more flexible with sorting by date. I would like to know if it is possible. If it is, please enlighten me!

Upvotes: 0

Views: 619

Answers (2)

MFR
MFR

Reputation: 2077

You can query them together.

# get report data
query.list <- Init(start.date = "XXXXXX",
                   end.date = "XXXXXX",
                   dimensions = "ga:date",
                   metrics = "ga:goalXXValue",
                   table.id = "ga:XXXXX")

Upvotes: 0

Ryan Praskievicz
Ryan Praskievicz

Reputation: 354

Any reason you can't use the reporting API? You can use dimension=ga:date and metrics=ga:goalXXCompletions (ga:goal1Completions).

See the link to the query explorer report below: https://ga-dev-tools.appspot.com/query-explorer/?start-date=2016-01-01&end-date=2016-03-27&metrics=ga%3Agoal1Completions&dimensions=ga%3Adate&samplingLevel=HIGHER_PRECISION&max-results=10000

Upvotes: 2

Related Questions