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 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?