Aims. We study the long-term time scale (i.e. period comparable to the orbital period of the outer perturber object) transit timing variations (TTVs) in transiting exoplanetary systems that contain another more distant (a 2 a 1 ) planetary or stellar companion. Methods. We give an analytical form of the O−C diagram (which describes such TTVs) in a trigonometric series, which is valid for arbitrary mutual inclinations, up to the sixth order in the inner eccentricity. Results. We show that the dependence of the O−C on the orbital and physical parameters can be separated into three parts. Two of these are independent of the real physical parameters (i.e. masses, separations, periods) of a concrete system and only depend on dimensionless orbital elements, so can be analysed in general. We find that, for a specific transiting system, where eccentricity (e 1 ) and the observable argument of periastron (ω 1 ) are known, say, from spectroscopy, the main characteristics of that TTV, which is caused by a possible third-body can be mapped simply. Moreover, as the physical attributes of a given system only occur as scaling parameters, the real amplitude of the O−C can also be estimated for a given system, simply as a function of the m 3 /P 2 ratio. We analyse the above-mentioned dimensionless amplitudes for different arbitrary initial parameters, as well as for two particular systems, CoRoT-9b and HD 80606b. We find in general that, while the shape of the O−C strongly varies with the angular orbital elements, the net amplitude (departing from some specific configurations) depends only weakly on these elements, but strongly on the eccentricities. As an application, we illustrate how the formulae work for the weakly eccentric CoRoT-9b and the highly eccentric HD 80606b. We also consider the question of detection, as well as the correct identification of such perturbations. Finally, we illustrate the operation and effectiveness of Kozai cycles with tidal friction (KCTF) in the case of HD 80606b.