To insert a loop correctly
 make sure that 

- the tempo of your sample (bpm) and the song's are the same

- the duration does not exceed 8 bars so it can be looped at least one time

- in case of melodic loop it must be within the song's chords progression