Magnet script for UNITY 3D

I’m working on a Google Cardboard project, right now i have a demo for Android where u can look around in a special scene i build in UNITY 3D, everything is working fine & looking good, but what I really want is:

I want to walk forward when I press the Google Cardboard magnet button.

I found a few script’s on the web, but I do not know exactly how to make these scripts work in my UNITY project.

Can anybody help me further with this?

I just know that you can detect magnet event by using if (Cardboard.SDK.CardboardTriggered)