How to integrate the UserWay Widget with a React Application

  • Updated

In this article, we will walk you through the installation process of UserWay in a React application.

To integrate UserWay into your React application, we will utilize the inline script addition method, which is suitable for short scripts that are specific to a particular component or page. We will explore the use of JSX components to achieve this.

  1. Add this code directly within your component's JSX code:

    import React from 'react';

    const UwScriptComponent = () => {
        return (
            <div> {/* JSX code */}  <script src="" data-account="YOUR_DATA_ACCOUNT"></script>

    export default UwScriptComponent;

    Make sure to replace  [YOUR_DATA_ACCOUNT] with your Account ID code.

  2. After adding the script, save the changes and start the React application:


Please ensure that your React component does not interfere with the final print or modify the data provided by the script.

If you look to manually add the Script inside your <body>, we have a tutorial here