【发布时间】:2021-02-19 06:32:11
【问题描述】:
假设我有一个托管在app.com 上的网站。我的网站通过 iframe 发布在另一个托管在 platform.com 上的网站上。
<html class="platform.com">
<body>
<iframe src="app.com">
//ga init code
ga("create", "UA-0000000", {
storage: "none",
userId: options.userId,
clientId: options.userId
});
</iframe>
</body>
</html>
问题是我可以看到发送到google-analytics.com/collect 的请求,但实际上没有数据提交到 Google Analytics(分析)报告。
我在 GA Admin 中检查了过滤器,但没有。我认为这个问题与当前域和请求源域不匹配有关,但我不知道我能做些什么来解决这个问题。
如您所知,我无法访问platform.com 代码,我只能操作 iframe 中的代码。
我使用了这些来源:
【问题讨论】:
标签: javascript iframe cookies google-analytics