weixin_33686714 2014-06-27 07:55 采纳率: 0%
浏览 27

AngularJS应用上的DFP广告

We are building an AngularJS web app and we are trying to integrate DFP ads. By the way, we already have a PHP web app with DFP ads running so I am familiar with how DFP integration works, but of course it is different on an AngularJS app, due to its front end loading nature. So, I know there are three components we need to get working:

In the <head>:

  • The DFP tag for either sync or async, as shown here, https://support.google.com/dfp_sb/answer/1651549. I know Google recommends async, but recently on our PHP app we had to switch to sync, since async doesn't support rich media, and we were also facing some reporting discrepancies with async. So, with an AngularJS app, can we still use sync, or only async?

  • The DFP tag in which we define the ad slots, and also call the enableServices, singleRequest or syncRendering, etc. By the way, we want to have dynamically populated ad slots per page (app state), so we have to figure that out.

, and in the <body>:

  • The tags for displaying the ads for the ad divs. On an AngularJS app would it work with .display() or would we need to call the .refresh() method?

Any help is much appreciated, thanks in advance.

Cheers,
Iraklis

  • 写回答

1条回答 默认 最新

  • 妄徒之命 2014-11-29 12:53
    关注

    Try this ngDfp

    ngDfp is a simple library for Angular JS that allows you to add DoubleClick for Publishers tags to your Angular site.

    To show an ad, use

    <div data-ng-dfp-ad="div-gpt-ad-1234567890123-0"></div>
    
    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题