Woman don't cheat the way Men do. They look for emotional support or fulfillment they are lacking at home. Perhaps the routine of married life has left her wanting for more. If you know for certain that she is having an online affair and you still want to work things through it is best to approach these situations with love.
That sounds like a lot, i know. Truly that is the heart of this situation. If you did not love her you would not be asking for help to get her back you would leave. Get to the source, and talk to her. Be open and calm and do your best to listen with a forgiving heart. It's so easy to lash out when we are the ones being hurt. Best to be the "better" man and show her what true love really is.
Regardless of what path you choose the road to recovery will be difficult. Trust will have to be rebuilt and both of you will need to work towards correcting what initially caused this betrayal. Do not lose hope, love is kind, love is patient, love knows no boundaries.
Best of luck.