Would you mind explaining what this does? I am vaguely aware of "advertising networks" but really don't get it enough to grok what you are doing.
How do you know what device an ad appeared on unless the ad is somehow pulling a monitoring .gif from your servers etc? (That's a bit 90s I know)