I use a product called shoe goo, but in Germany I would use Pattex.
In my opinion you want a glue that retains a bit flexibility (so not a 2-part epoxy) if you ever want to remove them.
The flexible glue allows for removal, but holds it firm enough that it doesn't move or rattle.