When should 了 be after the verb and when should it be at the end of the sentence? In a sentence such as "因为我去面试了，所以我刮了胡子", in one case, 了 is after the sentence, while in the other case it's after the verb, even though in both cases, 了 is used to express the past tense.

So how to know where to put 了? 

Are there any rules to follow?
In my opinion, you can use "了" right after the verb or at the end of the sentence when "了" is used to show the past tense. However, in your case, that's another thing that I want to clarify.

I think, "去面试" should be treated as one phrasal verb, something like the phrasal verb "go fishing", "go shopping" in English.Here "面试" (interview) is a noun which has a verbal meaning, and thus I will treat "去面试“ as one verb, rather than treat “面试” as the object of the verb "去".If you say "我去了北京", it's different because here "北京" is the object of "去“. Treating the two words as one verb, of course you should not insert “了” inside it.

I would say :


  因为我去面试了，所以我刮了胡子. or 因为我去面试了，所以我刮胡子了.


I would also say:


  因为我去参加(参加=participate in)了面试，所以我刮了胡子. 


Here, “去参加” is treated as one verb and “面试" is its object.

or


  因为我去参加面试了，所以我刮了胡子.