Follow the steps below to add your Visiopt UniversalSmart Code to your ReactJS project.
Step-by-Step Instructions
| 1 | Log in to your Visiopt account at app.visiopt.com. |
| 2 | Navigate to Settings → Manage Your Domain from the top navigation menu. |
| 3 | Click on the "Add New Domain" button to begin adding your website. |
| 4 | Fill in the required details: • Website Name — Enter a name for your website. • Website URL — Enter the full URL of your website (e.g., https://yourwebsite.com). • Frontend Framework — Select "ReactJS" from the dropdown list. Then click Save to proceed. |
| 5 | After saving, Visiopt will generate your unique UniversalSmart Code for your React domain. Copy this code snippet.
|
| 6 | Open your ReactJS project in your code editor. |
| 7 | Locate the index.html file inside the public/ folder of your project: your-react-app/ └── public/ └── index.html ← Add the code here |
| 8 | Paste the UniversalSmart Code inside the <head> tag of your index.html file, as shown below: |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>My React App</title>
<!-- Start Visiopt UniversalSmart Code --> // Paste your Visiopt UniversalSmart Code here <!-- End Visiopt UniversalSmart Code --> </head> <body> <div id="root"></div> </body> </html> |
| 9 | Save the index.html file and restart your React development server if it is running. |
| 📌 Note: The UniversalSmart Code must be placed inside the <head> section to ensure it loads on every page of your React application correctly. |
Comments
0 comments
Please sign in to leave a comment.