为 Google Analytics 4 创建 JavaScript 事件触发器

发布于 2025-01-15 08:55:57 字数 295 浏览 2 评论 0原文

Articulate Storyline 是一款用于创建交互式学习课程的软件。 我可以在故事情节文件中执行 JavaScript 触发器,以使用 Google Analytics 4 跟踪按钮点击。

我将以下代码添加到按钮,但它不起作用。

ga('send', 'event', 'Button', 'click', 'Next Button');

该代码在旧版本的 Google Analytics(UA)中运行良好。 许多设计师都在寻找答案。我们需要开发人员的帮助。 :) 任何建议将不胜感激。

Articulate Storyline is a software for creating interactive learning courses.
I can execute JavaScript triggers in storyline files to track button clicks with Google Analytics 4.

I added the following code to the button, but it didn't work.

ga('send', 'event', 'Button', 'click', 'Next Button');

The code was working fine with the old version of Google Analytics(UA).
Many designers are looking for the answer. We need developer's help. :)
Any advice would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我认为这里已经介绍了这一点:https://support.google.com/analytics/answer/11147304

看起来您可以

<script>
  gtag("event", "publish", {role: "Writer"});
</script>

编辑:此处文档中的附加信息; https://support.google.com/analytics/answer/11403294?hl= zh

I think this is covered here: https://support.google.com/analytics/answer/11147304

It looks like you can do

<script>
  gtag("event", "publish", {role: "Writer"});
</script>

Edit: additional information in the documentation here; https://support.google.com/analytics/answer/11403294?hl=en

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文