This tutorial describes the process of integrating the Dataisland widget, implemented using Web Components, into your website.
Add the following <script> tag before closing head tag to your HTML file to connect the widget:
<script type="module" src="proxy.php?url=https%3A%2F%2Fexample.com%2Fdataisland-widget.js"></script>
Also before closing body tag, add the following element (the order of arrangement does not matter):
<dataisland-widget
lang="ua"
apiUrl="apiUrl"
apiKey="apiKey"
></dataisland-widget>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dataisland Widget Integration</title>
<script type="module" src="proxy.php?url=https%3A%2F%2Fexample.com%2Fdataisland-widget.js"></script>
</head>
<body>
<h1>Example</h1>
<dataisland-widget
lang="ua"
apiUrl="apiUrl"
apiKey="apiKey"
></dataisland-widget>
</body>
</html>
apiUrl (required): URL of your API server. apiKey (required): Authorization token required to work with the API.
You can customize the appearance of the widget by adding CSS variables to the global styles:
dataisland-widget {
--border-color: #000;
--background-color: #f0f0f0;
}
#####Available variables:
--border-color: widget border color.--background-color: widget background color.
- Compatibility: The widget works in all modern browsers that support Web Components.
- Initialization: Make sure that the api-url and access-token attributes are passed correctly for successful SDK initialization.
- Updates: If the widget is updated on the server, your integration will automatically pull the new version (if using CDN).
If you have any questions or problems with the integration, please contact our support team:
- Email: [email protected]
- Documentation: https://example.com/docs