Have you thought about using the site variables in the delivery limitations section. You can target your banners using the variables and then make your sites pass as dynamic value into the invocation code. Rather than setting up multiple zones, just use one zone but with multiple site variables. This might be easier.
See this link https://www.reviveconsultant.com/articles/how-to-dynamically-insert-an-affiliate-id-into-a-banner/ maybe it is what you need.