1.)first of all type /fstack
2.) Open the mage portal thing and hover over your teleport.
3.) The box that the /fstack command poped up should have some info in it now. What you are looking for is the button name. It should be something like

mageteleportbutton23

Or something of that nature. Write down the name of the button. Now open you macro editor by typing /macro

Make a new macro name it whatever you want then in the text of the macro put.