How can I enable the "back" button of a Razer mouse? I couldn't find a way to get the back button of my Razer mouse to work with both Safari and Chrome, is there a workaround for this issue? I'm so used to surfing the web this way.

EDIT
I apologize for being unclear. I'm not using the Mac mouse, I'm using Mac mini with my Razer mouse. I installed the driver for that Mouse, unfortunately it only allows me to set the sensitivity and acceleration. I also tried to install Google Chrome, but it doesn't work either. When I click the side button of my mouse, it doesn't go back to the previous page. Under Windows, the default behavior of the back button in a mouse is to navigate back to the previous page, but it's not the case under Mac.
I really try to find a solution since I'm so used to the "back" button in my mouse. I feel so uncomfortable when having to click on the back arrow on my browser.
Could any one help me out? Thank you.
I made an open-source macOS utility called SensibleSideButtons that turns the side buttons on any generic mouse into universal navigation buttons. The application runs in your menu bar so you don't have to install any extra drivers. My approach is to bind the buttons to virtual left and right three-finger swipe gestures, which offers several benefits over the usual approach of binding the buttons to ⌘ + [ and ⌘ + ]: almost universal adoption across the OS (including Xcode), avoidance of destructive behavior, no menu bar blink or annoying noises, and commands only sent to the specific window under your cursor. The only requirement is that your side buttons emit standard M4 and M5 events, which most mice do.