Installation

DataGlue can be installed in multiple ways depending on your project setup and requirements. The easiest way to get started with DataGlue is to include it directly from our CDN:
<!DOCTYPE html>
<html>
<head>
    <title>Your Website</title>
</head>
<body>
    <!-- Your website content -->

    <!-- Add DataGlue script before closing body tag -->
    <script src="https://api.dataglue.io/glue.min.js"></script>
</body>
</html>

NPM Installation

For projects using a build system, install DataGlue via npm:
npm install dataglue
Then import and initialize:
import DataGlue from 'dataglue';

// Initialize DataGlue
const glue = new DataGlue();

Configuration Options

DataGlue can be configured through HTML attributes or JavaScript:

HTML Configuration

<script
  src="https://api.dataglue.io/glue.min.js"
  modules="formSearch"
  endpoint="https://api.example.com/data">
</script>

JavaScript Configuration

// Configure after loading
window.addEventListener('DOMContentLoaded', function() {
    glue.configure({
        modules: ['formSearch'],
        endpoint: 'https://api.example.com/data'
    });
});

Verification

After installation, verify DataGlue is working:
  1. Open browser developer tools
  2. Check for initialization message in console
  3. Verify data collection in localStorage
// Check if DataGlue is loaded
console.log(window.glue ? 'DataGlue loaded' : 'DataGlue not found');

Next Steps