Manage ads within a single page application

I am developing a single page application (SPA). Thus, I use to dynamically update the contents of an HTML page using Ajax requests.

I would like to enroll in DoubleClick for Publishers, but I wonder if my SPA will be able to integrate ads due to dynamic content downloaded without refreshing the page.

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

Therefore, I assume that everything is in order. But I would like to be sure before I start using DFP. Can someone please confirm?

Then sometimes I use external html pages that I still load using Ajax. Should I consider writing JavaScript banner ads inside these external views or directly on the main page of my application?

Last question: how can I manage users who have installed software for ad units? Can I detect the presence of adblocker software using JavaScript and then execute certain code for such users?

+6
source share
1 answer

I work in SPA and successfully work with DFP. Here is my feedback on your questions:

Therefore, I assume that everything is in order. But I would like to be sure before using DFP. Can someone please confirm?

  • Yes, you can update the banners using the method that you link to the link that you shared.

Then sometimes I use external html pages that I still load using Ajax. Should I consider writing JavaScript banner ads inside these external views or directly inside the main page of my application?

  • To download them from the outside, you will get lower results. You can control everything from the main page and you will have better results.

Last question: how can I manage users who have adblocker software installed? Can I detect the presence of an ad unit of software using JavaScript, and then execute certain code for this kind of users?

  • This is something that I did not start working on it, but you can find out (for example, forbes.com makes a site on it), and there are also projects on working with it there .
+1
source

All Articles