Short of the user pointing the device in the direction they are heading you wont be able to track the direction of there movement with only a magnetometer,
another thing to be aware of is the heading will change as you tilt it unless you correct it with an accelerometer (yes gets more complex doesn't it)
The pin in the corner is an indicator of pin 1, so you get it rotated correctly when mounting