Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manage ads inside a Single Page Application

I m developing a Single Page Application (SPA). So, I use to refresh the page's HTML's content dynamically using Ajax requests.

I'd like to register to the DoubleClick for Publishers program, but I m wondering if my SPA is able to integrate advertising due to its dynamic content loaded without refreshing the page.

I saw this link: https://support.google.com/dfp_sb/answer/3058726

So I assume it's ok. But I'd like to be certain before starting using DFP. Could someone confirm please?

Then, sometimes I m using external html pages that I still load using Ajax. Should I consider writing the advertising banners JavaScript inside these external views, or directly inside the master page of my app?

Last question: How can I manage users having an adblocker software installed? Am I allowed to detect the presence of an adblocker software using JavaScript and then execute some specific code for this kind of users?

like image 744
Rotan Avatar asked Nov 02 '15 18:11

Rotan


1 Answers

I'm working in a SPA and working with DFP successfully. Here is my feedback to your questions:

So I assume it's ok. But I'd like to be certain before starting using DFP. Could someone confirm please?

  • Yes, you can refresh the banners using the method you are refering in the link you shared

Then, sometimes I m using external html pages that I still load using Ajax. Should I consider writing the advertising banners JavaScript inside these external views, or directly inside the master page of my app?

  • To load them externally will bring you to lower performance results. You can control everything from the main page and you will have better results.

Last question: How can I manage users having an adblocker software installed? Am I allowed to detect the presence of an adblocker software using JavaScript and then execute some specific code for this kind of users?

  • This is something I have not started to work on it but you can detect (like forbes.com is doing on it website) and there are also projects on dealing with this.
like image 172
OscarDOM Avatar answered Oct 17 '22 03:10

OscarDOM