直接还是通过标签管理器集成Google Analytics(分析)?
我目前正在构建一个大型NextJS应用程序。我只需要为客户端集成Google Analytics 4即可。我应该将Google Analytics(直接包含在我的应用程序中)包含在我的应用程序中,还是包含标签管理器并通过它配置Google Analytics(分析)?
我以前从未真正使用过Google Analytics(分析),我感到困惑。从理论上讲,直接集成它是更实用的,因为我可以设置尺寸等,并且不必在标签管理器中配置太多?
谢谢
I am currently building a large NextJS application. I just need to integrate Google Analytics 4 for the client. Should I rather include Google Analytics directly in my application or include the Tag Manager and configure Google Analytics through it?
I have never really worked with Google Analytics before and I am confused. Theoretically it is more practical to integrate it directly, because I can set dimensions etc. and don't have to configure so much in the Tag Manager?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用标签管理器。它从您的代码库中抽象了微不足道的实现,并使在大多数情况下不需要开发资源的情况下维护和扩展它们变得更加容易。
另一方面,如果您要从分析所需的只是pageviews,那么,当然,您不需要GTM,只需直接实现它,然后一旦看到更多需要,就可以将逻辑移至标签管理器。
GTM非常好,免费。但是,专有。 MATOMO是免费的和开源的。不如GTM好。 Adobe的发布可能是最好的,但不是免费的(Adobe不认为它是独立产品),并且比GTM需要更多的技能。在两者之间,也有诸如Ensighten或Tealium之类的东西,但它们不是很先进。
You should use a tag manager. It abstracts trivial implementations from your codebase and makes it much easier to maintain and scale them without requiring dev resources in vast majority of cases.
On the other hand, if all you'll ever need from analytics are pageviews, then sure, you don't need GTM, just implement it directly and then once you see that you need more, you can move the logic to a tag manager.
GTM is pretty good and free. However, proprietary. Matomo is free and open sourced. Not as good as GTM though. Adobe Launch is probably the best, but it's not free (Adobe doesn't consider it a standalone product) and it requires a bit more skills than GTM. In between, there are also things like Ensighten or Tealium, but they're not very advanced.
如果您只需要在网站上进行分析,则无需使用GTM:您只需添加分析,仅此而已。
GTM使标签更易于管理和给出触发选项,因此它可能很有用:
If you only need Analytics on the website, no need to use GTM : you just add Analytics and that's it.
GTM makes tags easier to manage and gives trigger options, so it can be useful :