I'm having problems with some ad campaigns running on my site. Some clients are using DFP or another DSP to insert their analytics code.
How can I prevent or block this kind of situation? Is it possible?
Ad tags often have a lot of tags baked in. A tag from providers like Flashtalking, Celtra, or Google frequently has everything from analytics to third party verification tags to viewability tags wrapped into a single tag. (The Ghostery browser add-on will reveal all the tags that actually fire on a site with just a couple of ad scripts officially installed; the result can be amusing and surprising.)
Generally, there's no reason for you to be alarmed. They're not collecting data about your website; they're collecting data on how their tags are performing on your site. As someone who spent two years in ad ops trafficking ads, I can tell you that you have nothing to worry about in most cases.
But if you still want to have GA from other sources removed from your site, you have a couple of options:
Contact the advertiser or ad agency/network directly and let them know you don't allow GA tags that aren't yours on your site. Because the GA is baked into their tags - and Google advertising tags are particularly notorious for firing every kind of Google code within their tags and containers - there's not much you can do, short of disallowing that type of ad.
If you're having problems with AdSense, Doubleclick, etc. - it's a Google ad tag ecosystem problem - you have the option of removing their container from your website, and working with other ad networks and providers, specifying that you don't want Google ads running on your site. You would still get ads from non-Google ad exchanges, such as AppNexus.
Keep in mind as you do this that as a publisher, your advertising revenue may suffer as a result of either action I outlined above. If there is no specific reason why you don't want their GA to fire in the ads on your site, I'd recommend letting it run.