<tfoot id='dFzTB'></tfoot>

      <i id='dFzTB'><tr id='dFzTB'><dt id='dFzTB'><q id='dFzTB'><span id='dFzTB'><b id='dFzTB'><form id='dFzTB'><ins id='dFzTB'></ins><ul id='dFzTB'></ul><sub id='dFzTB'></sub></form><legend id='dFzTB'></legend><bdo id='dFzTB'><pre id='dFzTB'><center id='dFzTB'></center></pre></bdo></b><th id='dFzTB'></th></span></q></dt></tr></i><div id='dFzTB'><tfoot id='dFzTB'></tfoot><dl id='dFzTB'><fieldset id='dFzTB'></fieldset></dl></div>
      1. <small id='dFzTB'></small><noframes id='dFzTB'>

        <legend id='dFzTB'><style id='dFzTB'><dir id='dFzTB'><q id='dFzTB'></q></dir></style></legend>

          <bdo id='dFzTB'></bdo><ul id='dFzTB'></ul>
      2. 谷歌分析 api 查询特定 url

        google analytics api query a specific url(谷歌分析 api 查询特定 url)

        <small id='iT91S'></small><noframes id='iT91S'>

        <i id='iT91S'><tr id='iT91S'><dt id='iT91S'><q id='iT91S'><span id='iT91S'><b id='iT91S'><form id='iT91S'><ins id='iT91S'></ins><ul id='iT91S'></ul><sub id='iT91S'></sub></form><legend id='iT91S'></legend><bdo id='iT91S'><pre id='iT91S'><center id='iT91S'></center></pre></bdo></b><th id='iT91S'></th></span></q></dt></tr></i><div id='iT91S'><tfoot id='iT91S'></tfoot><dl id='iT91S'><fieldset id='iT91S'></fieldset></dl></div>
        <legend id='iT91S'><style id='iT91S'><dir id='iT91S'><q id='iT91S'></q></dir></style></legend>

        1. <tfoot id='iT91S'></tfoot>
                <tbody id='iT91S'></tbody>
                  <bdo id='iT91S'></bdo><ul id='iT91S'></ul>

                • 本文介绍了谷歌分析 api 查询特定 url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 PHP 访问 Google 分析 API,这对我有用,但我想进一步过滤结果.现在我正在使用:

                  I am accessing the Google analytics API with PHP which works on my end but I'd love to filter the results a bit further. Right now I am using:

                  $OBJresult = $analytics -> data_ga -> get(
                      'ga:' . $profilID,
                      '2012-01-01',
                      date( "Y-m-d" ),
                      'ga:visits',
                      array(
                          'dimensions' => 'ga:pagePath',
                          'metrics' => 'ga:pageviews',
                          'sort' => '-ga:pageviews',
                          'max-results' => '25'
                      )
                  );
                  

                  目前,这将返回一组 25 个按其命中排序的页面.我很想将结果限制在服务器内的特定路径.所以例如只查询 domain.com/news 并且只查看最热门的新闻页面是什么.我可以使用 PHP 进行过滤,但希望查询尽可能具体.

                  Currently this returns a set of 25 pages sorted by its hits. I would love to restrict the results to a specific path within the server. So e.g. only query domain.com/news and only see what the most hit news pages are. I can filter with PHP but rather have the query as specific as possible.

                  感谢您的帮助

                  推荐答案

                  使用 filters 选项.

                  $OBJresult = $analytics->data_ga->get(
                      'ga:' . $profilID,
                      '2012-01-01',
                      date("Y-m-d"),
                      'ga:visits',
                      array(
                          'filters' => 'ga:pagePath==/news',
                          'dimensions' => 'ga:pagePath',
                          'metrics' => 'ga:pageviews',
                          'sort' => '-ga:pageviews',
                          'max-results' => '25'
                      )
                  );
                  

                  请参阅此处,了解您的页面跟踪维度列表可以过滤.

                  See here for the list of page tracking dimensions you can filter on.

                  这篇关于谷歌分析 api 查询特定 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How do I pass parameters into a PHP script through a webpage?(如何通过网页将参数传递给 PHP 脚本?)
                  PHP - include a php file and also send query parameters(PHP - 包含一个 php 文件并发送查询参数)
                  Where can I read about conditionals done with quot;?quot; and quot;:quot; (colon)?(我在哪里可以阅读有关使用“?完成的条件的信息?和“:(冒号)?)
                  Accessing arrays whitout quoting the key(在不引用键的情况下访问数组)
                  What is the name for the quot;lt;lt;lt;quot; operator?(“lt;lt;lt;的名字是什么?操作员?)
                  default as first option in switch statement?(默认为 switch 语句中的第一个选项?)

                      <legend id='GWDZN'><style id='GWDZN'><dir id='GWDZN'><q id='GWDZN'></q></dir></style></legend>

                      <i id='GWDZN'><tr id='GWDZN'><dt id='GWDZN'><q id='GWDZN'><span id='GWDZN'><b id='GWDZN'><form id='GWDZN'><ins id='GWDZN'></ins><ul id='GWDZN'></ul><sub id='GWDZN'></sub></form><legend id='GWDZN'></legend><bdo id='GWDZN'><pre id='GWDZN'><center id='GWDZN'></center></pre></bdo></b><th id='GWDZN'></th></span></q></dt></tr></i><div id='GWDZN'><tfoot id='GWDZN'></tfoot><dl id='GWDZN'><fieldset id='GWDZN'></fieldset></dl></div>
                      • <bdo id='GWDZN'></bdo><ul id='GWDZN'></ul>

                        <small id='GWDZN'></small><noframes id='GWDZN'>

                            <tbody id='GWDZN'></tbody>

                        • <tfoot id='GWDZN'></tfoot>