- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已获得以下双击标签以在 Angular 应用程序中实现。
显然,下面的方法不适合单页应用程序。不知何故,我需要将下面的代码片段翻译成更适合 Angular 东西。
<script type="text/javascript">
var axel = Math.random() + "";
var a = axel * 10000000000000;
document.write('<iframe src="https://xxxxxxx.fls.doubleclick.net/activityi;src=xxxxxxx;type=ret;cat=getaq0;u1=[Equipment Cost];u2=[Equipment Type];u3=[Company Type];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');
</script>
<noscript>
<iframe src="https://xxxxxxx.fls.doubleclick.net/activityi;src=xxxxxxx;type=ret;cat=getaq0;u1=[Equipment Cost];u2=[Equipment Type];u3=[Company Type];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe>
</noscript>
我已经使用工具来实现类似的谷歌转换,但是,对于双击我找不到任何东西。
任何人都可以推荐一种工具或方法来实现我所追求的目标 - 例如,我可以简单地取消 iframe 并从 Angular 服务调用 src url 吗?
最佳答案
对我有用的是在 Angular 指令中实现此标记,因为代码将在加载时被编译并插入到页面上。我们的营销团队确认它正在发挥作用,并且他们可以看到点击率。
指令:floodlight-tag.directive.js
(function () {
'use strict';
angular.module('myApp')
.directive('floodlightTag', floodlightDirective);
floodlightDirective.$inject = ['$log'];
function floodlightDirective($log) {
return {
restrict: 'E',
template: '<div style="display: none"><img src="{{ trustedUrl }} " width="1" height="1" alt=""/></div>',
link: floodlightLink
};
function floodlightLink(scope, element, attr) {
var axel = Math.random() + "";
var a = axel * 10000000000000;
scope.trustedUrl = attr.src + a + '?';
}
}
})();
以及 HTML:some-page.html(它应该放在模板上,而不是 index.html
)
<floodlight-tag src="[your_floodlight_url]"></floodlight-tag>
我还没有弄清楚的一件事是,当您希望这些标签绑定(bind)到一个按钮(即单击时)时,如何让它工作。我目前正在研究解决方案。请参阅下面我如何解决第一个问题。
希望这有帮助!
关于javascript - DoubleClick Floodlight 代码和 AngularJS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42140477/
看这里: 从一个页面显示该元素有双击“dblclick”事件 但是当我尝试从控制台执行它时: 最佳答案 dblclick 不是一种方法,它是一种事件。假设您有一个按钮,并且您想手动触发该事件。你可以这
我正在使用 PropertyGrid 控件来编辑我的应用程序中的一些对象。我正在使用自定义 TypeConverter 和 TypeEditors 以获得更好的用户界面。 我对 bool 属性的自定义
The documentation for the MouseDoubleClick event州 Important DoubleClick events are logically higher-
DoubleClick 交换是否支持 openRTB 协议(protocol)? 最佳答案 Google Ad Exchange 在 HTTP Post 上使用 protobuf,并且有自己的模型。
我正在尝试为可编辑的 JTable 实现撤消(和重做)功能使用默认组件。 JTable有一个额外的类来指定其名为 SpecifiedJTable 的属性. 为此,我想捕获双击单元格的时刻(即选择/标记
是否有 ToolStripStatusLabel DoubleClick曾经工作吗? Private Sub myToolStripStatusLabel_DoubleClick(ByVal send
我有 html 表,里面有 tr 和 td。现在我所有的 Td 都在上不同的课。我想执行操作,就像每当我调用一个函数时,具有特定类的特定 td 自动执行双击功能,并且我传递的一个值将存储在该 td 中
我有一个来自广告网络的广告代码,其结构如下 api_key = X; param1 = Y; param2 = Z; ... 标
是否可以向广告素材的目标网址添加网址参数? 示例: 我在 DFP 广告管理系统 www.mysite.com 中具有目标链接的网站上加载横幅 页面上的 JavaScript 强制 DFP 广告管理系统
我是新来的,我正在尝试做一些理论上简单的事情,但我就是做对了。我需要在点击事件中触发 DCM Floodlight 代码。我遇到的问题是 href 元素中已经包含了一个 Google Analytic
有谁知道如何使用 Google sizeMapping 对象定位页外广告位以转换自适应广告? 我试过使用“页外”作为尺寸,但它不起作用。 var outOfPageMapping = googleta
我正在尝试将以下代码转换为“onClick”事件以添加到 HREF 标记。我的 JavaScript 经验有限,但我知道这是可以做到的。任何形式的指导将不胜感激。 var axel = Math.r
我有一个名为 listView 的 QListView。它是 MainWindow 中唯一的小部件。我想跟踪 listView 上的双击。所以,我这样做了: #include "mainwindow.
我遇到异常: '{0}' is not a Visual or Visual3D. 我发现唯一类似的问题:WPF: System.ArgumentException => {"'{0}' is not
我一直在尝试让 Doubleclick 广告代码加载我的动态内容。我有一个网站,当您向下滚动时,它会加载更多内容,而不必转到下一页、后退一页等。但是,我未能成功加载每 2 到 3 页上的广告。 有人知
我是网站 legiaodosherois.com.br 的所有者,在使用 Google DFP 开始我的第一个付费广告系列后遇到了问题。我所有的广告块都设置为 Adsense 回退,直到两天前我的所有
有没有一种方法可以在控件 DoubleClick 事件中获取鼠标光标的 (x, y) 坐标? 据我所知,位置必须从全局获取: Windows.Forms.Cursor.Position.X、Windo
WPF, Shapes 我有一个自定义 Shape ,并尝试实现 MouseClick和 MouseDoubleClick上面的东西。 通过例如。我需要打开一个关于 MyShape OnClick 的
我在 XAML 中有一个 ListView 控件。 这些项目由一个模板控件定义,该控件在网格内具有一个 TextBlock。 现在我想在双击 TextBlock 时触发一个 Action 。 令我惊讶
我在窗口上有一个带有 DataGrid 的 WPF/MVVM 应用程序。当用户双击 DataGrid 中的一行时,我想调用一个方法。 如何将 DataGrid 的 DblClick 事件绑定(bind
我是一名优秀的程序员,十分优秀!