When should I add fresh fruits in homemade yogurt?
The Codex Alimentarius standard 243-2003 on fermented milk products, states in section 2.3 that:

The non-dairy ingredients can be mixed in prior to/or after fermentation.

So, yes the recipe is correct and you can even sell the product if you follow all the other WHO standards as well.
However, as you introduce additional microbial agents when using fresh fruit, the rule of thumb (to be analytically tested) is half of the minimum of both products separately:

As you're probably doing this for home use, this means in plain English:
Eat the yoghurt in half the time you would eat the fresh fruit.
If this would be for professional use:
You should not be asking random strangers on the Internet what to do and have your commercial product tested analytically.  ;-)