Welcome to Zealot markp,
I've used both carpet tacks and wood glue before. The only real difference is when you start laying track, you might find a carpet tack under the track and you'll have to reposition it. Also with the glue you'll need some kind of weight to keep the cork from losing...