从嵌入的代码获取谷歌分析ID? [英] Get google analytics id from the code embed?

查看:106
本文介绍了从嵌入的代码获取谷歌分析ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个例子,我要嵌入的代码有一个ID格式: UA-3235632-1 ,但要使用数据导出API,我需要ID在这种情况下,从相应页面的URL中获得: 6270018



如何从真实ID UA类型ID?

解决方案

GA数据导出API的这一特性确实可以更清晰一些。



以下是您需要做的事:


  1. 登录到GA浏览器并在
    右上角的下拉菜单
    中选择您的GA账户中的
    interest(假设您的
    超过一个 - 如果您不愿意那你就是右边的
    了)。呈现的页面
    将成为该帐户的网站
    个人资料
    。找到该表中的
    行,该
    行对应于
    到您希望
    检索数据的配置文件(报告),并单击
    倒数第二列编辑;


  2. 您现在将看到的页面将在$ b $上方显示
    个人资料设置 b左手边角落。就在这之下,小字体
    ,你会看到 Profile
    ID
    ,后面跟着一串数字
    (可能是6到八)。这就是你想要的
    (在GA
    数据导出API的python客户端中,它被称为
    ,因为TABLE_ID))


要以编程方式检索此参数(TABLE_ID),GA数据导出API 帐户Feed 会在 dxp:tableID字段 。具体来说,账户查询将返回您有权访问的账户下的配置文件列表;每个配置文件在我上面提到的字段中都有一个tableID。

As an example, the code I have to embed has an ID of the form: UA-3235632-1, but to use the data export API I need the ID from the URL of the proper page, in this case: 6270018.

How do I get the real ID from the UA type ID?

解决方案

That feature of the the GA Data Export API could indeed be a little more clear.

Here's what you need to do:

  1. login to the GA Browser and in the upper-right-hand corner drop-down menu, select your GA Account of interest (assuming you have more than one--if you don't then you are already on right page). The page that renders will be the Website Profiles for that Account. Find the row in that table that corresponds to the Profile (Report) you want retrieve data from and click on the next-to-last column Edit;

  2. The page you'll see now will say Profile Settings in the upper left-hand corner. Just under that, in smaller font, you'll see Profile ID followed by a string of digits (probably six to eight). This is what you want (in the python client for the GA Data Export API, it is referred to as TABLE_ID)).

To retrieve this parameter (TABLE_ID) programmatically, the GA Data Export API Account Feed returns this value to you in the dxp:tableID field. In particular, an Account Query will return the list of profiles under that Account to which you have access; each Profile will have a tableID in the field i mentioned just above.

这篇关于从嵌入的代码获取谷歌分析ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆