@xapp/form-widget 1.78.0 → 1.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -1
- package/dist/components/Form/Form.stories.d.ts +2 -0
- package/dist/components/FormDisplay/FormDisplay.stories.d.ts +1 -0
- package/dist/components/WidgetStylesheet/WidgetStylesheet.d.ts +0 -0
- package/dist/components/WidgetStylesheet/WidgetStylesheet.test.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +54 -54
- package/dist/index.es.js.map +1 -1
- package/dist/stories/default-form.d.ts +1 -0
- package/dist/xapp-form-widget.css +88 -11
- package/dist/xapp-form-widget.js +26 -26
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
|
1
1
|
## Form Widget
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A scheduling widget that supports multi-step forms and displays.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Multi-step form flows with dynamic display logic
|
|
8
|
+
- Integration with Stentor conversational AI platform
|
|
9
|
+
- Automatic tracking parameter pass-through for analytics
|
|
10
|
+
- Material-UI components with theming support
|
|
11
|
+
- Audio/voice input capabilities
|
|
12
|
+
- Address autocomplete and service area validation
|
|
13
|
+
- Session management and response caching
|
|
14
|
+
|
|
15
|
+
## Tracking & Analytics
|
|
16
|
+
|
|
17
|
+
The form widget automatically captures and passes marketing attribution parameters to all API requests for analytics filtering.
|
|
18
|
+
|
|
19
|
+
### Supported Tracking Parameters
|
|
20
|
+
|
|
21
|
+
#### Standard UTM Parameters
|
|
22
|
+
- `utm_source` - Traffic source (e.g., "google", "facebook", "newsletter")
|
|
23
|
+
- `utm_medium` - Marketing medium (e.g., "cpc", "email", "social")
|
|
24
|
+
- `utm_campaign` - Campaign name (e.g., "spring_sale", "product_launch")
|
|
25
|
+
- `utm_term` - Paid keywords (for paid search campaigns)
|
|
26
|
+
- `utm_content` - Ad content identifier (for A/B testing)
|
|
27
|
+
|
|
28
|
+
#### Platform Click IDs
|
|
29
|
+
- `gclid` - Google Click ID (Google Ads auto-tagging)
|
|
30
|
+
- `fbclid` - Facebook Click ID
|
|
31
|
+
- `msclkid` - Microsoft Click ID (Bing Ads)
|
|
32
|
+
|
|
33
|
+
#### Custom Parameters
|
|
34
|
+
- `track_*` - Any parameter with "track_" prefix
|
|
35
|
+
|
|
36
|
+
### Implementation
|
|
37
|
+
|
|
38
|
+
Tracking parameters are automatically:
|
|
39
|
+
1. **Extracted** from the page URL when the widget loads
|
|
40
|
+
2. **Stored** in localStorage with 30-day expiration
|
|
41
|
+
3. **Included** in all Stentor API requests via the `attributes` field
|
|
42
|
+
4. **Available** for filtering in OpenSearch analytics
|
|
43
|
+
|
|
44
|
+
### API Integration
|
|
45
|
+
|
|
46
|
+
All tracking parameters are included in the request attributes sent to the Stentor API:
|
|
47
|
+
|
|
48
|
+
```javascript
|
|
49
|
+
// Example API request with tracking data
|
|
50
|
+
{
|
|
51
|
+
"sessionId": "stentor-form-session-123",
|
|
52
|
+
"userId": "user-456",
|
|
53
|
+
"attributes": {
|
|
54
|
+
"utm_source": "google",
|
|
55
|
+
"utm_medium": "cpc",
|
|
56
|
+
"utm_campaign": "spring_sale",
|
|
57
|
+
"gclid": "abc123def456",
|
|
58
|
+
"track_landing_page": "homepage"
|
|
59
|
+
},
|
|
60
|
+
// ... other request data
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Configuration
|
|
65
|
+
|
|
66
|
+
Tracking is enabled by default. The system handles:
|
|
67
|
+
- Parameter extraction and validation
|
|
68
|
+
- Automatic cleanup of expired data
|
|
69
|
+
- Cross-session persistence
|
|
70
|
+
- Error handling for malformed data
|
|
71
|
+
|
|
72
|
+
No additional configuration is required - the widget will automatically capture and pass through any UTM parameters, click IDs, or custom tracking parameters present in the page URL.
|
|
@@ -8,6 +8,8 @@ export declare const DefaultBlank: VFC;
|
|
|
8
8
|
export declare const Styled: VFC;
|
|
9
9
|
export declare const AutoOpened: VFC;
|
|
10
10
|
export declare const WithIframe: FC;
|
|
11
|
+
export declare const WithCustomFont: FC;
|
|
12
|
+
export declare const WithCustomFontAndOverride: FC;
|
|
11
13
|
export declare function buildDefaultTheme(_opts: {
|
|
12
14
|
fontFamily?: string;
|
|
13
15
|
}): FormWidgetTheme;
|
|
@@ -2,5 +2,6 @@ import { Meta } from "@storybook/react";
|
|
|
2
2
|
declare const _default: Meta;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const Default: any;
|
|
5
|
+
export declare const DefaultWithConsent: any;
|
|
5
6
|
export declare const WithFormServiceOptions: any;
|
|
6
7
|
export declare const WithFormServiceOptionsZipCodeServiceArea: any;
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Form, FormContainer, FormProps, FormWidget, FormWidgetProps, FormDisplay, WidgetStylesheet, } from "./components";
|
|
2
2
|
export { FormWidgetConfig, StentorApiConfig } from "./config";
|
|
3
|
-
export { FormWidgetCardTheme, FormWidgetCheckboxTheme, FormWidgetChipsTheme, FormWidgetDateTheme, FormWidgetDropdownTheme, FormWidgetTextTheme, } from "@xapp/stentor-form-widget-channel";
|
|
3
|
+
export { FormWidgetCardTheme, FormWidgetCheckboxTheme, FormWidgetChipsTheme, FormWidgetDateTheme, FormWidgetDropdownTheme, FormWidgetFontTheme, FormWidgetTextTheme, } from "@xapp/stentor-form-widget-channel";
|
|
4
4
|
export { SearchIcon, SpinnerIcon, LeftAngleIcon, RightAngleIcon } from "./components/icons";
|
|
5
5
|
export { parseWidgetEnv } from "./utils/parseWidgetEnv";
|
|
6
6
|
export * from "./components/FormDisplay/model";
|