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 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器