{"_id":"@hamed-bavar/xc-test","_rev":"30-5cf6eb01c6a334003190d64df57f184d","name":"@hamed-bavar/xc-test","dist-tags":{"latest":"1.2.1"},"versions":{"2.0.2":{"name":"@hamed-bavar/xc-test","version":"2.0.2","keywords":["security","form-tracking","analytics","cdn"],"author":"","license":"ISC","_id":"@hamed-bavar/xc-test@2.0.2","maintainers":[{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"}],"dist":{"shasum":"7c9cb94de20cb1b67323b777c9f1abd57abb74fc","tarball":"https://registry.npmjs.org/@hamed-bavar/xc-test/-/xc-test-2.0.2.tgz","fileCount":2,"integrity":"sha512-7FIzbyZjvAgfKpVarXzsrPa7UTL1lx3olVkgSDWM9ZXEpy0u1DvQRBu63ZKnALAKGqaly1QB1Fh8Wfo/ILkiXg==","signatures":[{"sig":"MEUCIEcx0a2qPmH5J/2t5TQI/U5834lrIkXB2o2ZJgFpA8WRAiEAzwXjS1h6UzzOznh5AXSfVBnkJ6zJMucLzye6qKafmsU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13766},"main":"dist/xc-test.cjs.js","type":"module","types":"dist/xc-test.d.ts","unpkg":"dist/xc-test.min.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"module":"dist/xc-test.esm.js","browser":"dist/xc-test.min.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/xc-test.d.ts","import":"./dist/xc-test.esm.js","default":"./dist/xc-test.esm.js","require":"./dist/xc-test.cjs.js"}},"gitHead":"ca8ace551e4ede309559ccebfb464a1f044c28b2","scripts":{"dev":"npm run build:watch & npm run serve:node","lint":"eslint src/**/*.{js,ts,tsx} --fix","test":"npm run build && npm run serve","build":"rollup -c","clean":"rimraf dist","serve":"python -m http.server 8000","commit":"cz","format":"prettier --write .","prepare":"husky","lint:check":"eslint src/**/*.{js,ts,tsx}","pre-commit":"npm run format && npm run lint","serve:node":"npx http-server -p 8000 -c-1","build:watch":"rollup -c --watch","commit-lint":"commitlint --from HEAD~1 --to HEAD --verbose","format:check":"prettier --check .","commit-lint:last":"commitlint --from HEAD~1"},"_npmUser":{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"},"_npmVersion":"10.8.2","description":"CrossClassify Package","directories":{},"lint-staged":{"*.{json,md}":["prettier --write"],"*.{js,ts,tsx}":["prettier --write","eslint --fix"]},"_nodeVersion":"20.19.1","dependencies":{"@fingerprintjs/fingerprintjs":"^4.6.2"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.0.0","tslib":"^2.8.1","eslint":"^9.0.0","rimraf":"^6.0.1","rollup":"^4.50.1","prettier":"^3.0.0","@eslint/js":"^9.0.0","commitizen":"^4.3.1","typescript":"^5.9.2","lint-staged":"^15.0.0","@commitlint/cli":"^19.8.1","@rollup/plugin-terser":"^0.4.4","eslint-config-prettier":"^9.0.0","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.0.0","cz-conventional-changelog":"^3.3.0","@rollup/plugin-node-resolve":"^16.0.1","@commitlint/config-conventional":"^19.8.1","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/xc-test_2.0.2_1757841038774_0.6693985693584465","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@hamed-bavar/xc-test","version":"1.2.0","keywords":["security","form-tracking","analytics","cdn"],"author":"","license":"ISC","_id":"@hamed-bavar/xc-test@1.2.0","maintainers":[{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"}],"dist":{"shasum":"7e927451e9a73177efc3e80521b223caba2ae5f8","tarball":"https://registry.npmjs.org/@hamed-bavar/xc-test/-/xc-test-1.2.0.tgz","fileCount":9,"integrity":"sha512-AjH4fuxh6jnkzRosvFvs9K7T4UoNDGzVFdqGlnBz94c+ZeLOYn0HI7KDtxmCq9Dp6RWEwUxQnEckObaRXMBJEQ==","signatures":[{"sig":"MEYCIQDRuDm3pMwXav1rkTOqDVhqk+z8CaGrY/RtE/OFCuo6CwIhAKDND4VLJ5HwefjTiYzk23Y7/mNAbxM8YowMhLOROjyt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":644307},"main":"dist/xc-sdk.cjs.js","type":"module","types":"dist/xc-sdk.d.ts","unpkg":"dist/xc-sdk.min.js","config":{"commitizen":{"path":"cz-conventional-changelog"}},"module":"dist/xc-sdk.esm.js","browser":"dist/xc-sdk.min.js","engines":{"node":">=16.0.0"},"exports":{".":{"types":"./dist/xc-sdk.d.ts","import":"./dist/xc-sdk.esm.js","default":"./dist/xc-sdk.esm.js","require":"./dist/xc-sdk.cjs.js"}},"gitHead":"4bd99914467e2a55953728b80bfde90c479abc92","scripts":{"dev":"npm run build:watch & npm run serve:node","lint":"eslint src/**/*.{js,ts,tsx} --fix","test":"npm run build && npm run serve","build":"rollup -c","clean":"rimraf dist","serve":"python -m http.server 8000","commit":"cz","format":"prettier --write .","prepare":"husky","lint:check":"eslint src/**/*.{js,ts,tsx}","pre-commit":"npm run format && npm run lint","serve:node":"npx http-server -p 8000 -c-1","build:watch":"rollup -c --watch","commit-lint":"commitlint --from HEAD~1 --to HEAD --verbose","format:check":"prettier --check .","prepublishOnly":"npm run clean && npm run pre-commit && npm run build","commit-lint:last":"commitlint --from HEAD~1"},"_npmUser":{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"},"_npmVersion":"10.8.2","description":"CrossClassify Package","directories":{},"lint-staged":{"*.{json,md}":["prettier --write"],"*.{js,ts,tsx}":["prettier --write","eslint --fix"]},"_nodeVersion":"20.19.1","dependencies":{"@fingerprintjs/fingerprintjs":"^4.6.2"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.0.0","tslib":"^2.8.1","eslint":"^9.0.0","rimraf":"^6.0.1","rollup":"^4.50.1","prettier":"^3.0.0","@eslint/js":"^9.0.0","commitizen":"^4.3.1","typescript":"^5.9.2","lint-staged":"^15.0.0","@commitlint/cli":"^19.8.1","rollup-plugin-dts":"^6.2.3","@rollup/plugin-terser":"^0.4.4","eslint-config-prettier":"^9.0.0","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/parser":"^8.0.0","cz-conventional-changelog":"^3.3.0","@rollup/plugin-node-resolve":"^16.0.1","@commitlint/config-conventional":"^19.8.1","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/xc-test_1.2.0_1757847065568_0.047824918533258653","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@hamed-bavar/xc-test","version":"1.2.1","description":"CrossClassify Package","type":"module","main":"dist/xc-sdk.cjs.js","module":"dist/xc-sdk.esm.js","browser":"dist/xc-sdk.min.js","unpkg":"dist/xc-sdk.min.js","types":"dist/xc-sdk.d.ts","exports":{".":{"types":"./dist/xc-sdk.d.ts","import":"./dist/xc-sdk.esm.js","require":"./dist/xc-sdk.cjs.js","default":"./dist/xc-sdk.esm.js"}},"scripts":{"build":"rollup -c","build:watch":"rollup -c --watch","serve":"python -m http.server 8000","serve:node":"npx http-server -p 8000 -c-1","test":"npm run build && npm run serve","dev":"npm run build:watch & npm run serve:node","clean":"rimraf dist","lint":"eslint src/**/*.{js,ts,tsx} --fix","lint:check":"eslint src/**/*.{js,ts,tsx}","format":"prettier --write .","format:check":"prettier --check .","pre-commit":"npm run format && npm run lint","prepare":"husky","prepublishOnly":"npm run clean && npm run pre-commit && npm run build","commit":"cz","commit-lint":"commitlint --from HEAD~1 --to HEAD --verbose","commit-lint:last":"commitlint --from HEAD~1"},"keywords":["security","form-tracking","analytics","cdn"],"license":"ISC","author":"","devDependencies":{"@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@eslint/js":"^9.0.0","@rollup/plugin-commonjs":"^28.0.6","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.4","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","commitizen":"^4.3.1","cz-conventional-changelog":"^3.3.0","eslint":"^9.0.0","eslint-config-prettier":"^9.0.0","husky":"^9.0.0","lint-staged":"^15.0.0","prettier":"^3.0.0","rimraf":"^6.0.1","rollup":"^4.50.1","rollup-plugin-dts":"^6.2.3","tslib":"^2.8.1","typescript":"^5.9.2"},"dependencies":{"@fingerprintjs/fingerprintjs":"^4.6.2"},"lint-staged":{"*.{js,ts,tsx}":["prettier --write","eslint --fix"],"*.{json,md}":["prettier --write"]},"engines":{"node":">=16.0.0"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"_id":"@hamed-bavar/xc-test@1.2.1","gitHead":"2f36df2b48f01d6250636d4e951234099e4c1978","_nodeVersion":"20.19.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-wsD6smVkZr2rhdV1kRICpQFFKFo8yamyNtlBeB489lDFWjaaT2v159GGEzoZsIsFVLW9xBLjARtQwU5a5J/vNA==","shasum":"0cdfc3eb03c73149048442e5a9b00d1bc19b8d7b","tarball":"https://registry.npmjs.org/@hamed-bavar/xc-test/-/xc-test-1.2.1.tgz","fileCount":16,"unpackedSize":649635,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCKkdRCo3ulxbwfw3J97Ib9WulkOpg74RwXv/P1HQslbQIgGp9PY1jWCuprR/z+Mwm+loxJQzEIvzefEwO5kfnYzzw="}]},"_npmUser":{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"},"directories":{},"maintainers":[{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/xc-test_1.2.1_1757847411249_0.2608801126864977"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-10T12:31:30.134Z","modified":"2025-09-14T10:56:51.640Z","1.0.0":"2025-09-10T12:31:30.536Z","1.0.1":"2025-09-10T13:07:08.039Z","1.0.2":"2025-09-10T13:13:07.740Z","1.0.3":"2025-09-10T13:40:52.935Z","1.0.4":"2025-09-10T13:47:45.166Z","1.0.5":"2025-09-10T15:03:01.815Z","1.0.7":"2025-09-11T07:48:33.783Z","1.1.0":"2025-09-11T10:15:10.505Z","1.1.1":"2025-09-11T10:20:51.721Z","1.1.2":"2025-09-11T10:32:37.870Z","1.1.4":"2025-09-11T12:30:19.209Z","1.1.6":"2025-09-12T16:21:52.494Z","1.1.7":"2025-09-12T16:31:51.500Z","2.0.2":"2025-09-14T09:10:38.994Z","1.2.0":"2025-09-14T10:51:05.810Z","1.2.1":"2025-09-14T10:56:51.483Z"},"license":"ISC","keywords":["security","form-tracking","analytics","cdn"],"description":"CrossClassify Package","maintainers":[{"name":"hamed-bavar","email":"hamedbavarnegin@gmail.com"}],"readme":"# xc-sdk\n\nCrossClassify Package for advanced form tracking and analytics with seamless integration across web frameworks.\n\n## 🚀 Features\n\n- **Cross-framework support**: Works with Angular, React, and vanilla JavaScript\n- **Automatic form detection**: Intelligently detects login and signup forms\n- **Custom element targeting**: Override default selectors for specific elements\n- **Real-time interaction tracking**: Monitors user interactions with form elements\n- **Fingerprinting integration**: Uses FingerprintJS for visitor identification\n- **Developer-friendly**: Built-in developer mode with detailed logging\n\n## 📦 Installation\n\n### NPM/Yarn\n\n```bash\nnpm install xc-sdk\n# or\nyarn add xc-sdk\n```\n\n### CDN\n\nFor quick integration without package managers, include the CrossClassify SDK directly via CDN. This approach works well for static websites or when you want to add tracking to existing forms without modifying your build process. The loginRoute and signupRoute parameters should match the URL paths where your login and signup forms are hosted in your application (at least one is required).\n\n```html\n<body>\n  //other scripts...\n  <script src=\"https://unpkg.com/xc-sdk@latest/dist/xc-sdk.min.js\"></script>\n  <script>\n    CrossClassify.initXC(SITE_ID, API_KEY, {\n      developerMode: true,\n      loginRoute: LOGIN_ROUTE, // eg: \"/auth/login\"\n      signupRoute: SIGNUP_ROUTE, // eg: \"/auth/signup\"\n    });\n  </script>\n</body>\n```\n\n#### ❓ How does this work?\n\nWhen you include **XC SDK via CDN**, the script automatically runs in the browser and starts looking for login/signup forms.  \nIt does this using a **heuristic-based element detection system**:\n\n- Scans the page for elements that look like **email inputs**\n- Detects **password fields** by type or naming patterns\n- Identifies **submit buttons** by attributes or text content (e.g., \"Login\", \"Sign in\")\n\nIf your form uses **standard HTML inputs**, most of the time it will be tracked automatically without any extra configuration.\n\nBehind the scenes, the SDK uses a combination of:\n\n- **CSS selectors** (`input[type=\"email\"]`, `button[type=\"submit\"]`, etc.)\n- **Attribute matching** (`name*=\"user\"`, `id*=\"pass\"`, etc.)\n- **Text-based matching** (button text like \"Login\", \"Submit\", \"Register\")\n\nThis means it can work out-of-the-box on most login/signup pages.\n\nIf your app uses **non-standard form markup**, you can override this by providing your own `formElementSelectors` in the config.\n\n👉 check the [Troubleshooting section](#issue-elements-not-being-detected).\n\n## 🔧 Framework Integration\n\n### React\n\n**1. Install the package:**\n\n```bash\nnpm install xc-sdk\n```\n\n**2. Initialize CrossClassify in your login, signup or root component::**\n\nThe CrossClassify SDK should be initialized when your form component mounts. The `loginRoute` and `signupRoute` parameters should match the URL paths where your login and signup forms are hosted in your application (at least one is required). The SDK will only track forms when users are on these specified routes.\n\n```jsx\nimport React, {useEffect} from \"react\";\nimport {initXC} from \"xc-sdk\";\n\nconst LoginPage = () => {\n  useEffect(() => {\n    initXC(SITE_ID, API_KEY, {\n      developerMode: true,\n      loginRoute: LOGIN_ROUTE, // eg: \"/auth/login\"\n      signupRoute: SIGNUP_ROUTE, // eg: \"/auth/signup\"\n    });\n  }, []);\n\n  return (\n    <div>\n      <form>\n        <input type=\"email\" placeholder=\"Email\" />\n        <input type=\"password\" placeholder=\"Password\" />\n        <button type=\"submit\">Login</button>\n      </form>\n    </div>\n  );\n};\n\nexport default LoginPage;\n```\n\n### Angular\n\n**1. Install the package:**\n\n```bash\nnpm install xc-sdk\n```\n\n**2. Initialize CrossClassify in your login, signup or root component::**\n\nInitialize the SDK in the `ngOnInit` lifecycle method. Specify the routes where your Angular application hosts the login and/or signup forms. The SDK will automatically detect and track form interactions when users navigate to these routes.\n\n```typescript\nimport {Component, OnInit} from \"@angular/core\";\nimport {initXC} from \"xc-sdk\";\n\n@Component({\n  selector: \"app-login\",\n  templateUrl: \"./login.component.html\",\n  styleUrls: [\"./login.component.scss\"],\n})\nexport class LoginComponent implements OnInit {\n  ngOnInit() {\n    initXC(SITE_ID, API_KEY, {\n      developerMode: true,\n      loginRoute: LOGIN_ROUTE, // eg: \"/auth/login\"\n      signupRoute: SIGNUP_ROUTE, // eg: \"/auth/signup\"\n    });\n  }\n}\n```\n\n## ⚙️ Configuration Options\n\nThe third parameter of `initXC()` accepts a configuration object with the following options:\n\n### Basic Configuration\n\nThe minimum configuration requires specifying at least one route where your forms are located. The SDK will monitor these routes and automatically detect form interactions when users navigate to them.\n\n```javascript\n{\n  // Enable detailed logging and debugging information\n  developerMode: true, // boolean, default: false\n\n  // At least one route is required - specify where your forms are hosted\n  loginRoute: \"/auth/login\",      // Your application's login page route\n  signupRoute: \"/auth/signup\",    // Your application's signup page route\n}\n```\n\n### Advanced Element Selection\n\n```javascript\n{\n  // Custom selectors for form elements\n  formElementSelectors: {\n    // Email field selector\n    emailElementSelector: EMAIL_SELECTOR,       // eg: \"#email-input\"\n    // or use CSS selectors\n    emailElementSelector: 'input[name=\"email\"]',\n    // or use text search\n    emailElementSelector: 'text:Email Address',\n\n    // Password field selector\n    passwordElementSelector: PASSWORD_SELECTOR,  // eg: \"#password-input\"\n    passwordElementSelector: 'input[type=\"password\"]',\n    passwordElementSelector: 'text:Password',\n\n    // Submit button selector\n    submitElementSelector: SUBMIT_SELECTOR,      // eg: \"#submit-button\"\n    submitElementSelector: 'button[type=\"submit\"]',\n    submitElementSelector: 'text:Sign In'\n  }\n}\n```\n\n### Element Wait Configuration\n\n```javascript\n{\n  observerConfig: {\n    // Time to wait for elements to appear (in milliseconds)\n    observerTimeout: TIMEOUT_MS; // eg: 2000 (default: 2000ms)\n  }\n}\n```\n\n### Complete Configuration Example\n\n```javascript\ninitXC(SITE_ID, API_KEY, {\n  developerMode: true,\n  loginRoute: LOGIN_ROUTE, // eg: \"/auth/login\"\n  signupRoute: SIGNUP_ROUTE, // eg: \"/auth/register\"\n  formElementSelectors: {\n    emailElementSelector: EMAIL_SELECTOR, // eg: \"#user-email\"\n    passwordElementSelector: PASSWORD_SELECTOR, // eg: \"#user-password\"\n    submitElementSelector: SUBMIT_SELECTOR, // eg: \"#login-submit\"\n  },\n  observerConfig: {\n    observerTimeout: TIMEOUT_MS, // eg: 12000\n  },\n});\n```\n\n## 🎯 Element Selection Methods\n\nThe package supports multiple ways to identify form elements (Id selector, attribute selector and text selector):\n\n### 1. CSS and Id Selectors (Recommended)\n\n```javascript\nformElementSelectors: {\n  emailElementSelector: '#email-element-id',         // ID selector\n  passwordElementSelector: 'input[type=\"password\"]', // Attribute selector\n  submitElementSelector: 'input[type=\"submit\"]'\n}\n```\n\n### 2. Text Content Search\n\n```javascript\nformElementSelectors: {\n  emailElementSelector: 'text:Email',         // Finds elements containing \"Email\"\n  passwordElementSelector: 'text:Password',   // Finds elements containing \"Password\"\n  submitElementSelector: 'text:Sign In'       // Finds buttons with \"Sign In\" text\n}\n```\n\n### 3. Fallback to Auto-Detection\n\nIf you don't specify `formElementSelectors`, the package will automatically detect common form elements using built-in selectors.\n\n## 🔍 Troubleshooting\n\n### Issue: Elements Not Being Detected\n\n**Symptoms:**\n\n- Console warnings about missing elements\n- No tracking data being sent\n\n**Solutions:**\n\n1. **Enable Developer Mode** to see detailed logs:\n\n```javascript\ninitXC(SITE_ID, API_KEY, {\n  developerMode: true,\n});\n```\n\n2. **Specify Custom Selectors** if auto-detection fails:\n\n### Custom Selectors Example (Vanilla HTML)\n\nIf auto-detection fails, you can specify custom selectors in a plain HTML page like this:\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>XC SDK - Custom Selector Example</title>\n  <script src=\"https://unpkg.com/xc-sdk@latest/dist/xc-sdk.min.js\"></script>\n  <script>\n      // Initialize XC SDK with custom selectors\n      CrossClassify.initXC(\"YOUR_SITE_ID\", \"YOUR_API_KEY\", {\n        formElementSelectors: {\n          emailElementSelector: \"#user-email\",       // targets email input\n          passwordElementSelector: \"#user-password\", // targets password input\n          submitElementSelector: \"#login-submit\"     // targets submit button\n        }\n      });\n  </script>\n</head>\n<body>\n  <h2>Login Form</h2>\n  <form>\n    <input\n      id=\"user-email\"          <!-- emailElementSelector target -->\n      type=\"email\"\n      placeholder=\"Email\"\n    />\n    <input\n      id=\"user-password\"       <!-- passwordElementSelector target -->\n      type=\"password\"\n      placeholder=\"Password\"\n    />\n    <button\n      id=\"login-submit\"        <!-- submitElementSelector target -->\n      type=\"submit\"\n    >\n      Login\n    </button>\n  </form>\n</body>\n</html>\n```\n\n**Explanation:**\n\n- The form elements are explicitly mapped using `emailElementSelector`, `passwordElementSelector`, and `submitElementSelector`.\n\n### Issue: No Data Being Sent\n\n**Check:**\n\n1. Verify your SITE_ID and API_KEY are correct\n2. Ensure you're on the correct route (LOGIN_ROUTE or SIGNUP_ROUTE)\n3. Check browser console for error messages\n4. Verify form elements exist when `initXC()` is called\n\n## 📋 Default Element Selectors\n\nIf you don't specify custom selectors formElementSelectors, the package will look for elements matching these patterns:\n\n### Email Fields:\n\n- `input[type=\"email\"]`\n- `input[name*=\"email\" i]`\n- `input[id*=\"email\" i]`\n- `input[name*=\"user\" i]`\n- `input[id*=\"login\" i]`\n- And many more common patterns...\n\n### Password Fields:\n\n- `input[type=\"password\"]`\n- `input[name*=\"pass\" i]`\n- `input[id*=\"pass\" i]`\n- `input[name*=\"secret\" i]`\n- And more...\n\n### Submit Buttons:\n\n- `button[type=\"submit\"]`\n- `input[type=\"submit\"]`\n- Elements with text containing \"login\", \"signin\", \"submit\", etc.\n- And more patterns...\n\n## 🔄 API Reference\n\n### `initXC(siteId, apiKey, config)`\n\nInitializes CrossClassify tracking for form analytics and user behavior monitoring.\n\n**Parameters:**\n\n- **`siteId`** _(number)_ - **Required**: Your unique site identifier from the CrossClassify dashboard\n  - Example: `12345`\n\n- **`apiKey`** _(string)_ - **Required**: Your API authentication key from the CrossClassify dashboard\n  - Example: `\"xc_live_abcd1234efgh5678ijkl\"`\n\n- **`config`** _(object)_: Configuration object with the following properties:\n\n  #### Core Configuration\n  - **`developerMode`** _(boolean)_ - Enable detailed console logging for debugging (default: `false`)\n  - **`loginRoute`** _(string)_ - **Optional**: URL path in your application where login forms are hosted (e.g., `\"/auth/login\"`)\n  - **`signupRoute`** _(string)_ - **Optional**: URL path in your application where signup forms are hosted (e.g., `\"/auth/register\"`)\n\n  > **Note**: At least one route (`loginRoute` or `signupRoute`) must be specified for the SDK to function. The SDK will only track forms when users visit these specified routes in your application.\n\n  #### Custom Element Selectors\n  - **`formElementSelectors`** _(object)_ - Override default element detection:\n    - **`emailElementSelector`** _(string)_ - CSS selector, ID selector, or text search for email field\n    - **`passwordElementSelector`** _(string)_ - CSS selector, ID selector, or text search for password field\n    - **`submitElementSelector`** _(string)_ - CSS selector, ID selector, or text search for submit button\n\n  #### Advanced Configuration\n  - **`observerConfig`** _(object)_ - Element detection timing:\n    - **`observerTimeout`** _(number)_ - Milliseconds to wait for elements to appear (default: `2000`)\n\n**Returns:** `void`\n\n**Example:**\n\n```javascript\ninitXC(12345, \"xc_live_abcd1234efgh5678ijkl\", {\n  developerMode: true,\n  loginRoute: \"/auth/login\",\n  signupRoute: \"/auth/register\",\n  formElementSelectors: {\n    emailElementSelector: \"#user-email\",\n    passwordElementSelector: \"#user-password\",\n    submitElementSelector: \"#login-button\",\n  },\n  observerConfig: {\n    observerTimeout: 10000,\n  },\n});\n```\n\n**Note:** Replace the example values with your actual credentials from the CrossClassify dashboard.\n","readmeFilename":"README.md"}