Advances in our numerical and theoretical understanding of gamma-ray burst afterglow processes allow us to construct models capable of dealing with complex relativistic jet dynamics and non-thermal emission, that can be compared directly to data from instruments such as Swift. Because afterglow blast waves and power law spectra are intrinsically scale-invariant under changes of explosion energy and medium density, templates can be generated from large-scale hydrodynamics simulations. This allows for iterative template-based model fitting using the physical model parameters (quantifying the properties of the burster, emission and observer) directly as fit variables. Here I review how such an approach to afterglow analysis works in practice, paying special attention to the underlying model assumptions, possibilities, caveats and limitations of this type of analysis. Because some model parameters can be degenerate in certain regions of parameter space, or unconstrained if data in a limited number of a bands is available, a Bayesian approach is a natural fit. The main features of the standard afterglow model are reviewed in detail.