How do I add the Intercom script in my React app?

What you want to do is put the script to load intercom either in your index.html or in your entry component to load their analytics object. From their docs you can initialize it like this

class MyComponent extends Component {
    constructor(props){
        super(props);
        window.Intercom('boot', {
          app_id: INTERCOM_APP_ID,
          // other settings you'd like to use to initialize Intercom
        });
    }
    ....
}

Accepted answer is correct. In detail:

class LandingPage extends Component {

  constructor(props) {
    super(props);

    // initialize intercom (don't forget to *update* when page changes)
    window.Intercom("boot", {
      app_id: "your_app_id"
    });
  }
}

https://app.intercom.io/a/apps/bhfx1oqj/messages/guide/identify_your_users/track_users