In this paper, we prove a new version of the Birkhoff ergodic theorem (BET) for random variables depending on a parameter (alias integrands). This involves variational convergences, namely epigraphical, hypographical and uniform convergence and requires a suitable definition of the conditional expectation of integrands. We also have to establish the measurability of the epigraphical lower and upper limits with respect to the $\sigma$-field of invariant subsets. From the main result, applications to uniform versions of the BET to sequences of random sets and to the strong consistency of estimators are briefly derived.