【发布时间】:2016-12-27 19:58:53
【问题描述】:
我正在尝试动态填充 google adwords 再营销标签。 这是谷歌代码的样子:
<script type="text/javascript">
var google_tag_params = {
dynx_itemid: 'REPLACE_WITH_VALUE',
dynx_itemid2: 'REPLACE_WITH_VALUE',
dynx_pagetype: 'REPLACE_WITH_VALUE',
dynx_totalvalue: 'REPLACE_WITH_VALUE',
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = {converion-id}; // replace {converion-id} with your conversion id
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<!-- replace {converion-id} with your conversion id -->
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/{converion-id}/?value=0&guid=ON&script=0"/>
</div>
</noscript>
在加载的每个页面上,我想通过 angular 动态替换 dynx_itemid 变量。 我很想听听你对此的看法。我找到了以下库https://github.com/mooyoul/angulartics-google-adwords-remarketing-tag,但它只支持再营销标签,不支持动态标签。
谢谢
【问题讨论】:
-
我认为
angular.js必须实现异步 AdWords 再营销代码 -> developers.google.com/adwords-remarketing-tag/asynchronous -
感谢艾哈迈德的编辑!
标签: javascript angularjs google-ads-api