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

      <bdo id='cooHy'></bdo><ul id='cooHy'></ul>
    <i id='cooHy'><tr id='cooHy'><dt id='cooHy'><q id='cooHy'><span id='cooHy'><b id='cooHy'><form id='cooHy'><ins id='cooHy'></ins><ul id='cooHy'></ul><sub id='cooHy'></sub></form><legend id='cooHy'></legend><bdo id='cooHy'><pre id='cooHy'><center id='cooHy'></center></pre></bdo></b><th id='cooHy'></th></span></q></dt></tr></i><div id='cooHy'><tfoot id='cooHy'></tfoot><dl id='cooHy'><fieldset id='cooHy'></fieldset></dl></div>
      <tfoot id='cooHy'></tfoot>
      <legend id='cooHy'><style id='cooHy'><dir id='cooHy'><q id='cooHy'></q></dir></style></legend>
      1. Google Analytics PHP(发送信息)

        Google Analytics PHP (Sending information)(Google Analytics PHP(发送信息))

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

              1. <tfoot id='90eCD'></tfoot>

                <small id='90eCD'></small><noframes id='90eCD'>

                  <tbody id='90eCD'></tbody>
                  <bdo id='90eCD'></bdo><ul id='90eCD'></ul>
                  本文介绍了Google Analytics PHP(发送信息)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在处理一个项目,我需要使用 Google Analytics 服务器端.我不需要检索信息,但我需要发送信息.我最终可以发送 js 脚本客户端,但在这种情况下它不是一个选项.

                  I am working on a project and I need to use Google Analytics server side. I do not need to retrieve information, but I need to send information. I could eventually send js script client side, but in this scenario it is not an option.

                  以下大部分链接真的很旧.2012~

                  我已经阅读了多篇 StackOverflow 帖子,但他们只提到了检索信息的方法.

                  I have read multiple StackOverflow posts, but they only mention ways to retrieve information.

                  Google Analytics 的 PHP API(SO)

                  有一篇关于发送信息的帖子,但该库已弃用 GitHub.

                  There is this one post talking about sending information but the GitHub has been deprecated for that library.

                  Google Analytics PHP API 重定向 URI (SO)

                  Google api php 客户端(GOOGLE)

                  如何使用 PHP 将信息发送到我的 Google Analytics(分析)帐户?谢谢

                  How do I send information to my Google Analytics account in PHP? Thanks

                  推荐答案

                  您通过 测量协议.不需要特殊的库或开发工具包,您只需将参数附加到 GA 端点并通过 Curl/fopen/sockets/whatever 将它们发送到 Google Analytics.

                  You send data via the Measurement Protocol. No special library or dev kit is required, you simply append parameters to the GA endpoint and send them via Curl/fopen/sockets/whatever to Google Analytics.

                  每个调用至少包含您要向其发送数据的帐户的 ID、一个允许将交互分组到会话中的客户端 ID(因此它应该是每个访问者的唯一标识,但它不能识别用户的个人身份)、一个交互类型(浏览量、事件、时间等,某些交互类型需要额外参数)和您使用的协议版本(目前只有一个版本).

                  Each calls includes at least the ID of the account you want to send data to, a client id that allows to group interactions into sessions (so it should be unique per visitor, but it must not identify a user personally), an interaction type (pageview, event, timing etc., some interactions types require additional parameters) and the version of the protocol you are using (at the moment there is only one version).

                  因此,记录浏览量的最基本示例如下所示:

                  So the most basic example to record a pageview would look like this:

                  www.google-analytics.com/collect/v=1&tid=UA-XXXXY&cid=555&t=pageview&dp=%2Fmypage
                  

                  这篇关于Google Analytics PHP(发送信息)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 语句中的第一个选项?)

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

                    • <small id='1G4GD'></small><noframes id='1G4GD'>

                        • <bdo id='1G4GD'></bdo><ul id='1G4GD'></ul>
                          <legend id='1G4GD'><style id='1G4GD'><dir id='1G4GD'><q id='1G4GD'></q></dir></style></legend>
                          <tfoot id='1G4GD'></tfoot>
                            <tbody id='1G4GD'></tbody>