dsgdfh302506 2017-08-14 12:22
浏览 86
已采纳

使用PHP从谷歌分析导入反向链接

I'm trying to import my backlinks from Google Analytics API with PHP. I have tried with the Analytics API, but I can not find the correct data. In search console, I can find all the links to my page, but from Analytics ga:FullReferrer, I only get links that others have clicked to come to my page. It's not the same list at all.

I have tried https://ga-dev-tools.appspot.com/query-explorer/ and can not find the correct list. Do I look in the wrong places? Is there another API for Google Search Console?

function getResults($analytics, $profileId) {
  $optParams = array(
    'dimensions' => 'ga:fullReferrer, ga:source',
    'max-results' => '50000');

  return $analytics->data_ga->get(
      'ga:' . $profileId,
      '2005-01-01',
      'today',
      'ga:sessions', $optParams);
}

This returns links people have clicked. But I want the list from Google Search Console "Links to your page".

Any help is much appreciated - thanks.

  • 写回答

1条回答 默认 最新

  • doucaishou0074 2017-08-14 12:31
    关注

    from Analytics ga:FullReferrer, I only get links that others have clicked to come to my page

    Google Analytics only records interactions with your page, so this is by design. Search console has an API, too, but judging from the documentation this will not give you referrer info.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?