如何在Google Analytics Export API上关联ga:campaign和ga:pagePath(内容)?

时间:2023-02-09 15:19:15

Using custom reports you are able to drill down on a specific campaign and then choose the Landing Page or content page that the individual visitor choose. When I try to retrieve the same information through the Google Analytics Export API, I get an error if I try to relate those two dimensions in my feed. Is there any success story about getting this information together. I know is possible, we just don't know what is the correct combination.

使用自定义报告,您可以深入了解特定广告系列,然后选择个人访问者选择的目标网页或内容页面。当我尝试通过Google Analytics导出API检索相同的信息时,如果我尝试在Feed中关联这两个维度,则会收到错误消息。是否有关于将这些信息整合在一起的成功案例。我知道是可能的,我们只是不知道什么是正确的组合。

Since I had no progress on this issue during the last week I thought about giving a little more information. I am presenting below a screen shot of an actual report of the Google Analytics UI givin the information that I am trying to pull and I am getting no info. Basically the campaing information group by the pagePage landed. So I am able to know who clicked on my emails and where that person landed.

由于我在上周没有在这个问题上取得进展,我想提供更多信息。我将在下面的屏幕截图中显示Google Analytics用户界面UI的实际报告,并提供我想要提取的信息,但我没有收到任何信息。基本上由页面的活动信息组登陆。所以我能够知道谁点击了我的电子邮件以及该人登陆的位置。

Landing page from Campaign information http://img.readytocloud.com/ganalytics-*/R2C-6-28-2009-002.png

来自广告系列信息的登录页面http://img.readytocloud.com/ganalytics-*/R2C-6-28-2009-002.png

I just found other people with the same questions on the Google Analytic Help Forum.

我刚在Google Analytic帮助论坛上发现了其他人也有同样的问题。

2 个解决方案

#1


I just tried it with some GA data. It seems to be picky about what metric you join it to but ga:pageviews works. Both ga:campaign and ga:pagePath are dimensions and you need to join them to a metric. You can reference GA documentation here regarding what are the valid combinations. As an example, I managed to retrieve a really long report using (replace with your profile id):

我只是尝试了一些GA数据。关于你加入它的指标似乎很挑剔,但ga:浏览量有效。 ga:campaign和ga:pagePath都是维度,您需要将它们加入指标。您可以在此处参考GA文档,了解哪些是有效组合。例如,我设法使用(替换为您的个人资料ID)检索一个非常长的报告:

https://www.google.com/analytics/feeds/data?ids=ga:123456&dimensions=ga:campaign,ga:pagePath&metrics=ga:pageviews&sort=ga:campaign,ga:pagePath&start-date=2009-01-01&end-date=2009-06-30

Hope this helps.

希望这可以帮助。

#2


If you are using java or servlet, you can use authentication method in analytics api to authenticate first, and then you can retrieve data from the profile of that user.

如果您使用的是java或servlet,则可以先使用analytics api中的身份验证方法进行身份验证,然后可以从该用户的配置文件中检索数据。

#1


I just tried it with some GA data. It seems to be picky about what metric you join it to but ga:pageviews works. Both ga:campaign and ga:pagePath are dimensions and you need to join them to a metric. You can reference GA documentation here regarding what are the valid combinations. As an example, I managed to retrieve a really long report using (replace with your profile id):

我只是尝试了一些GA数据。关于你加入它的指标似乎很挑剔,但ga:浏览量有效。 ga:campaign和ga:pagePath都是维度,您需要将它们加入指标。您可以在此处参考GA文档,了解哪些是有效组合。例如,我设法使用(替换为您的个人资料ID)检索一个非常长的报告:

https://www.google.com/analytics/feeds/data?ids=ga:123456&dimensions=ga:campaign,ga:pagePath&metrics=ga:pageviews&sort=ga:campaign,ga:pagePath&start-date=2009-01-01&end-date=2009-06-30

Hope this helps.

希望这可以帮助。

#2


If you are using java or servlet, you can use authentication method in analytics api to authenticate first, and then you can retrieve data from the profile of that user.

如果您使用的是java或servlet,则可以先使用analytics api中的身份验证方法进行身份验证,然后可以从该用户的配置文件中检索数据。