将Google Analytics用于API(Using Google Analytics for an API)

编程入门 行业动态 更新时间:2024-10-23 01:46:20
Google Analytics用于API(Using Google Analytics for an API)

我有一个用node.js编写的小API,没有附加网站,它只适用于AJAX调用。 我想知道是否可以使用Google Analytics或其他优秀的Google Analytics工具来监控流量。

I have a small API written in node.js that has no website attached, it works only on AJAX calls. I want to know if it is possible to use Google Analytics, or other good Analytics tool to monitor traffic.

最满意答案

我认为这取决于你如何设置东西,但我想知道你是否也不能只是将JavaScript的常规JavaScript跟踪添加到你的API中。 如果您不能这样做,您应该查看“ 度量协议概述” ,它允许您自己将原始数据发送到Google Analytics。

I think it depends on how you have things set up but I wonder if you couldn't just add the normal JavaScript tracking to your API since its JavaScript as well. In the event you cant do that you should check out the Measurement Protocol Overview, it will allow you to send the raw data to Google Analytics yourself.

更多推荐

本文发布于:2023-08-04 08:51:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1412574.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Google   Analytics   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!