Not getting Goal name using Google Analytics gapi

烂漫一生 提交于 2019-12-24 08:48:20

问题


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


回答1:


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




回答2:


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,



来源:https://stackoverflow.com/questions/22380860/not-getting-goal-name-using-google-analytics-gapi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!