如何跟踪我在其他网站上嵌入的 Flash 视频播放器
设置:
- 一个在线电视频道,带有“youtube”之类的剪辑和类别
- 我们自己的 flash 视频播放器,可以嵌入到其他远程站点
- as2 flash 播放器
目标: 跟踪谁嵌入了我的视频,至少有每个域的基本统计数据。
由于是AS2,所以这样做比较困难。我的想法是我可以创建一个 PHP 页面,每次播放器加载到任何网站时都应该打开该页面;然后 Flash 播放器可以对包含 Google Analytics 代码或其他一些不错的跟踪器的 PHP 文件执行“geturl”。
geturl 命令可以包含一个变量,例如已经包含在播放器中的视频标题;这个标题将通过 GET 传递到 PHP 文件并设置一个可以很好跟踪的动态页面标题。
问题:如何在用户浏览器不打开新选项卡或窗口的情况下使用 GETURL 函数。有什么隐藏的方法可以做到吗?
Setup:
- an online tv channel with "youtube" like clips and categories
- our own flash video player which can be embeded into other remote sites
- as2 flash player
Goal:
To track who's embedding my videos, at least with basic statistics per domain.
Since it's AS2, it's harder to do this. My idea is that I can create a PHP page which should be opened each time the player loads on any website; then the flash player can do a "geturl" of the PHP file which has Google Analytics code or some other decent tracker.
The geturl command could contain a variable like the Video Title which already is included in the player; and this title would pass on with GET to the PHP file and setup a dynamic page title which can be tracked very well.
Problem: how to I use the GETURL function without having user's browser open a new tab or window. Is there any hidden way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现的主要问题是,只有在 的 html 嵌入代码中有allowScriptAccess 时,才能存在对外部信息的控制,如下所示:
和
标签中。
这对我来说有点晚了,因为我不能告诉每个嵌入我的播放器的人将这些行添加到他们的网站,但从现在开始......无论如何,想要隐藏的人可以轻松删除这些行。 所以我重命名了 SWF 文件 ...现在每个进行远程嵌入的人都必须回来检查并获取新代码。
这是有效的 AS2 代码:
因此,跟踪仅适用于我自己的站点,不适用于 sql 中显示为空或“null”的外部远程嵌入站点。
这是我用 SQL 编写的 PHP 代码。我只做了一些用于插入的东西,稍后我将进行显示和选择......
The main problem I found is that control over the external information can only exist if there is allowScriptAccess in the html embed code of the , like this:
and
In the tag.
This is a bit late for me since I can't tell everyone who embeds my player to add those lines to their site, but from now on... Anyway, someone who wants to hide can easily just delete the lines. So I renamed the SWF file ... and now everyone who does the remote embed has to check back and get the new code.
Here's the AS2 code that worked:
So the tracking only works on my own site, not the external remote embedding sites which come up empty or "null" in sql.
And here's the PHP code I made with SQL. I've only made something for the insertion and I'm going to work on display and selection later...
最简单的方法是使用 LoadVars:
我不确定是否有任何沙盒限制。
The easiest way to do this is to use LoadVars:
I'm not really sure if there are any Sandbox-restrictions for this.
Salut Dan,
有一段时间没做as2了。
(来源:mochibot.com)
我记得我用过mochibot,
您可以跟踪您的 swf,无论它在哪里
嵌入的。
他们可能仍然有 as2 跟踪。
Salut Dan,
Haven't done as2 in a while.
(source: mochibot.com)
I remember I used mochibot,
you could track your swf, wherever it might be
embedded.
They might still have the as2 tracking.