  We reconsider the dynamics of the Universe in the presence of interactions in
the cosmological dark sector. A class of interacting models is introduced via a
real function $f\left(r\right)$ of the ratio $r$ between the energy densities
of the (pressureless) cold dark matter (CDM) and dark energy (DE). The subclass
of models for which the ratio $r$ depends only on the scale factor is shown to
be equivalent to unified models of the dark sector, i.e. models for which the
CDM and DE components can be combined in order to form a unified dark fluid.
For specific choices of the function $f\left(r\right)$ we recover several
models already studied in the literature. We analyse various special cases of
this type of interacting models using a suitably modified version of the CLASS
code combined with MontePython in order to constrain the parameter space with
the data from supernova of type SNe Ia (JLA), the Hubble constant $H_{0}$,
cosmic chronometers (CC), baryon acoustic oscilations (BAO) and data from the
Planck satellite (Planck TT). Our analysis shows that even if data from the
late Universe ($H_{0}$, SNe Ia and CC) indicate an interaction in the dark
sector, the data related to the early Universe (BAO and Planck TT) constrain
this interaction substantially, in particular for cases in which the background
dynamics is strongly affected.
