What errors are you seeing?
Typically, you would use any server-side code in getInitialProps (you might check for request to make sure it only runs server-side). Browser SDK should probably be used on componentDidMount (or any regular React lifecycle method).