Just in general, when you use the word "before" in a sentence, the past perfect is not necessary. That does not mean that it is wrong, but the simple past will work. The past perfect usually functions to stage events that happened in the past. Adverbs like "before" do that.
Student or Learner