I had a 2012 Impreza key. The FCC ID matches but the insides of the remote look different and there is no 8 digit code so you can't program it. I sent mine back and got a refund. Then I bought a Legacy key and it worked great.
The valet key won't open the glove box due to the cut of the key. It looks like the tip is slightly wider, so it won't fit in at all. It might be easy enough to file down and make it work but I haven't tried.