Inclusive fitness theory has been described as being limited to certain special cases of social evolution. In particular some authors argue that the theory can only be applied to social interactions having additive fitness effects, and involving only pairs of individuals. This article takes an elegant formulation of non-additive public goods games from the literature, and shows how the two main generalizations of Hamilton's rule can be applied to such games when group sizes are random. In doing so inclusive fitness theory is thus applied to a very general class of social dilemmas, thereby providing further evidence for its generality. Interestingly, one of the two predominant versions of Hamilton's rule is found to be mathematically easier to apply to the scenario considered, despite both necessarily giving equivalent predictions.