Gopro sells a clip/magnet for this.
I used it for my bike rides too, its strong enough and grips well. Definitely suggest having hypersmooth on its a lot of movement on the bike / also keep in mind you can flip the camera upside down as I would since my riding position wasn't up right.