Set yourself a target of how many days you want to go to your gym in a chosen period. Each time you're at the gym, you'll prove it by pressing a button on your phone. You'll need location sharing on, of course!
When you set yourself the challenge, you stake $10 as motivation. If you hit your target then the money is refunded. If you fail, the money is donated to Save The Children and a receipt will be emailed to you. It's a win-win!