I want to deliver a JS ad-unit, one which can interact with the user a bit. Can this be done via an established ad network?

The ad-unit is a bit of javascript that will manage a block on the page. One approach is to persuade publishers to put my script tag onto their pages. The downside is, you need to persuade them one by one, and the details of how they actually put a tag into their pages will vary depending on the CMS they use.

Is it possible to instead deliver an interactive ad via established ad networks (such as DoubleClick or AppNexus or OpenX Ad-Exchange or other)?

That is, I'd setup my script with Delivery-Network-X as an advert, and Delivery-Network-X would, when paid, put it into online magazine pages, just like they do for image-adverts.

I've talked with people who suggest it's possible, but I can't find documentation. There are security reasons why this might not be possible (the publisher is allowing unknown code into their page), but there are potential solutions to that -- eg using iframes or a restricted subset of JavaScript.

My use-case is an opt-in ad-unit that starts with the viewer selecting an option. Se we have to display something, then record and respond to a click.

  • Sorry but this question is unclear, possibly off-topic and far too broad. Please visit our help centre for further advice as it may be saved with clever editing assuming it fits our guidelines. Jan 2, 2017 at 20:56
  • 1
    Hello @SimonHayter I'm sorry this question is unclear. I've added some text to clarify it. I think it's on-topic (fitting with other questions about adverts on websites), and if I can explain it right then it's not broad -- I'm looking to do something quite specific. If it is still unclear, could you explain what part is unclear? Jan 3, 2017 at 10:18
  • NB: Thanks to Simon and Stephen for helping edit this question. Jan 3, 2017 at 15:20
  • 1
    I suspect security issue is the main concern. Publisher won't be happy to see Ads containing java-script which have the potential of doing anything to their webpage. Anyway, what kind of interactivity do you need other than a click? Jan 11, 2017 at 4:34
  • 1
    The interactivity I need is for opt-in adverts: initially the user is shown a choice of offers, then if they click to accept one, they're shown an advert. Jan 11, 2017 at 8:59

1 Answer 1


Yes, it is possible, however it really depends on the ad network itself. For a good starting point, please see Google's Rich Media site. It has examples of ad formats, info where a given format can run, building blocks for creating ads, real life examples, and dev docs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.