I take it your talking about an *existing* song? mp3 etc?
Problem is that all songs (well most of them unless they're using a really obvious drum track) vary by a few bpm. The way I analyze it is use the "Fit Improvisation" tool.
This is what I do if I'm learning a song from an mp3 or whatever. (No, I'm not good enough to do it all by ear and memory

)
1) load the song onto an audio track.
2) trim off silence at the beginning
3) create a midi track, then record a track hitting C3 at 4/4 (or whatever the signature) with the music. make sure you have the first beat at the exact start of the midi track. you can edit the midi to make sure it lines up etc any way you want.
4) select the midi track and then Process \ "Fit Improvisation"
5) a temp map is created that aligns the audio tack to the beat that you gave it (and of course you can see the tempo in bpm and how it varries etc) Now the chord changes etc all line up with measures etc instead of all over the place.
Takes me about 1 minute + whatever the length of the song playing.
I usually then drop markers at the verse, chorus etc. Then if I'm learning the song I add the chords etc and wherever melody and riffs etc. Either in piano roll or staff.