Both are fine. The Past Perfect is often not used when a word like 'before' makes the sequence of events clear. But consider these two examples, with different meanings..
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.