Not getting Goal name using Google Analytics gapi

2019-08-01 01:49发布

I have to get goal name using gapi. Also, I have seen all dimensions and metrics, but i don't get goal name.

https://developers.google.com/analytics/devguides/reporting/core/dimsmets

Can anyone help me how can i get goal name. Do we have any dimension like ga:goalName?

Thanks in advance

2条回答
劳资没心,怎么记你
2楼-- · 2019-08-01 02:13

The only way to get the Goal name associated with a goal is to go though the management api Goal list

There isn't any way to get the goal name or number as a dimension on the GA website or via the API. Goal Dimension and metric list

查看更多
我欲成王,谁敢阻挡
3楼-- · 2019-08-01 02:24

If you want to get active goals and their name then please use http://www.seerinteractive.com/blog/google-analytics-management-api-phpinterface-for-php

Replace PROTOCOL with https

After that just change gManagementApi.class.php file const GOOGLE_MANAGEMENT_URL ='PROTOCOL://www.google.com/analytics/feeds/datasources/ga/accounts';

to

const GOOGLE_MANAGEMENT_URL = 'PROTOCOL://www.googleapis.com/analytics/v3/management/accounts';

Thanks,

查看更多
登录 后发表回答