如何以编程方式为GA的网络属性创建跟踪代码

时间:2019-01-07 11:02:40

标签: c# google-analytics google-api google-analytics-api

如何以编程方式(c#)将网络媒体资源的跟踪代码插入Google Analytics(分析)。如果我们将该资源手动添加到Google Analytics(分析),则可以通过点击“获取跟踪ID”来获取跟踪代码。但是我正在使用c#创建该属性。但是我没有得到如何获取跟踪ID。

1 个答案:

答案 0 :(得分:0)

If you are creating the account and web property programmaticly then the response web property response from property insert contains an id field which is the tracking id.

id string Web property ID of the form UA-XXXXX-YY.

As for the full javascript snippit. That is not returned by the API your going to have to create that yourself.