Consider this scenario...

Each page on the site displays a single banner advertisement (Joomla native module). The module is configured to be random (one banner at a time). There are 3 clients registered: Stores A, B and C.

  • Client A has 1 ad (basketball ball offer)
  • Client B has 3 ads (dress, t-shirt, sneakers)
  • Client C has 1 ad (cars).

In the random function, client B is having 3 times more banner impressions than the others and this has become a problem.

I can not limit the number of ads per customer, but I need to match impressions per customer. How to do this?

  • For this basic scenario, I feel like you might just "pad" (duplicate) the current respective ads for Client A and C to create "balance". This gets trickier as the factors of equality will change with different ad counts. I mean if you had 2 and 3 and 4 ads (for A, B, C), then you would have to pad all Clients to 12 ads each (so that there would be equal distribution within their own pool of ads as well). In other words, A would have 6 copies of each (2) ads; B would have 4 copies of 3 ads; C would have 3 copies of 4 ads. Even as I type this out, this seems like a real headache to manage. Mar 12, 2019 at 23:17
  • Am I understanding your conundrum? Mar 12, 2019 at 23:18
  • In fact, the actual scenario is comprised (today) by twelve advertisers who insert and delete new ads in real time. I simplified the creation of the scenario to be clear the visualization of the problem. But advertising duplication is definitely not functional at all. I have already tried to find in the mod_banner code and com_banner the line that calls the randomize function, without success. Mar 13, 2019 at 12:08
  • Theoretically, what he wanted to do was ask for two raffles (first, the client and then the client's first draw banner). I have already observed that even the random function obeys an equal certainty in division. So it would be something "theoretically" simple to solve. I just do not have the technical knowledge for this! Mar 13, 2019 at 12:08
  • Could you perhaps edit your question to further specify the business logic with your more realistic details? If you can break it down in plain English, there is sure to be someone who can piece together the technical aspects for you. I may or may not be the one tp solve this, but I am not confident that I fully understand things regarding "advertisers", "raffles", and "equal certainty of division". Keep working with us, it will all be worth it. Mar 13, 2019 at 13:44

1 Answer 1


looking at the Banner component the setting of the number of impressions and max. impression is at the Banner level and not the Client level.

You say you had 12 people add and delete in real-time so my thoughts are the process that you have in place that allows them to do this is where you need to build the intelligence you want as the Banner component is a very simple implementation model.

Using your example of person 'you' who has 3 banners and is buying 33% of 1000 banners you will need them be assigned 111 impression for each of their banners.


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.