简体   繁体   English

如何在Drupal 7中访问共享的Google Analytics(分析)ID

[英]How do I access the shared google analytics id in Drupal 7

I am looking to use the Drupal Google analyics tracking Id in another part of Drupal to do some custom tracking. 我希望在Drupal的另一部分中使用Drupal Google分析跟踪ID进行一些自定义跟踪。

I want to use the shared ga uA code that has been entered by the user and not create a new one. 我想使用用户输入的共享ga uA代码,而不要创建新的代码。 How do I get a programmatic reference to the GA id that the user has already entered into the GA module. 如何获得用户已经输入到GA模块中的GA ID的编程参考。

尝试这个:

$ga_id = variable_get('googleanalytics_account');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Google Analytics(分析)中将事件链接并提取到会话ID? - How do I link and extract events to a session ID in google analytics? 如何在Google Analytics中设置用户ID? - How do I set up the User ID in Google Analytics? 如何从 Google Analytics 4 获取视图 ID? - How do I get View ID from Google Analytics 4? 如何访问发送到谷歌分析的“无cookie ping”? - How do I access the "cookieless pings" sent to google analytics? 如何使用Meteor中的okgrow:analytics包将用户ID发送到Google Analytics? - How do I send a user id to Google Analytics using the okgrow:analytics package in Meteor? Drupal 8 Google Analytics 模块,以编程方式获取 ID - Drupal 8 Google Analytics module, get the ID programatically 如何在Rails中的Google Universal Analytics跟踪代码中设置USER_ID? - How do I set USER_ID in Google Universal Analytics tracking code in Rails? Google Analytics测量协议:如何从服务器上的cookie获取客户端ID? - Google Analytics Measurement Protocol: How do I get the client-id from cookie on the server? 如何在Google Analytics(分析)报告中显示用户数据和用户ID - how do i display user-data and user-id in google analytics report 如何将Google Analytics(分析)与Sitecore 6结合使用? - How do I use Google Analytics with Sitecore 6?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM