@survicate/survicate-web-package 28.13.10-npm → 28.14.0-npm
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/package.json +1 -1
- package/survicate_widget.d.ts +52 -0
- package/survicate_widget.js +1 -1
package/package.json
CHANGED
package/survicate_widget.d.ts
CHANGED
|
@@ -122,6 +122,8 @@ export interface ConfigModel {
|
|
|
122
122
|
disableTargeting?: true;
|
|
123
123
|
/** Disable persistence of sensitive visitor data */
|
|
124
124
|
disableSensitiveDataPersistence?: boolean;
|
|
125
|
+
/** Force surveys to display in a specific language (IETF language tag, e.g., "en", "fr", "pt-BR") */
|
|
126
|
+
forcedLanguage?: string;
|
|
125
127
|
/** Array of survey IDs to hide from targeting */
|
|
126
128
|
hiddenSurveys?: string[];
|
|
127
129
|
/** Content Security Policy nonce for script injection */
|
|
@@ -292,6 +294,31 @@ export interface SurveyApi {
|
|
|
292
294
|
*/
|
|
293
295
|
retarget: () => void;
|
|
294
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Force the survey language to a specific IETF language tag
|
|
299
|
+
*
|
|
300
|
+
* This method overrides all automatic language detection methods (URL parameters,
|
|
301
|
+
* path segments, TLD, and browser language). The language will be applied to all
|
|
302
|
+
* surveys until explicitly changed or cleared.
|
|
303
|
+
*
|
|
304
|
+
* The argument must be a valid IETF language tag such as:
|
|
305
|
+
* - A two-letter ISO 639 code (e.g., "en", "fr")
|
|
306
|
+
* - A three-letter code for languages without the two-letter equivalent (e.g., "haw", "yue")
|
|
307
|
+
* - A language tag with region (e.g., "en-US", "pt-BR")
|
|
308
|
+
*
|
|
309
|
+
* @param languageTag - IETF language tag to force for all surveys
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```javascript
|
|
313
|
+
* // Force surveys to display in French
|
|
314
|
+
* Survicate.setSurveyLanguage('fr');
|
|
315
|
+
*
|
|
316
|
+
* // Force surveys to display in Brazilian Portuguese
|
|
317
|
+
* Survicate.setSurveyLanguage('pt-BR');
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
setSurveyLanguage: (languageTag: string) => void;
|
|
321
|
+
|
|
295
322
|
/**
|
|
296
323
|
* Set visitor traits/attributes for targeting and identification
|
|
297
324
|
* @param attributes - Object containing visitor attributes
|
|
@@ -489,6 +516,31 @@ declare const Survicate: {
|
|
|
489
516
|
*/
|
|
490
517
|
retarget: () => void;
|
|
491
518
|
|
|
519
|
+
/**
|
|
520
|
+
* Force the survey language to a specific IETF language tag
|
|
521
|
+
*
|
|
522
|
+
* This method overrides all automatic language detection methods (URL parameters,
|
|
523
|
+
* path segments, TLD, and browser language). The language will be applied to all
|
|
524
|
+
* surveys until explicitly changed or cleared.
|
|
525
|
+
*
|
|
526
|
+
* The argument must be a valid IETF language tag such as:
|
|
527
|
+
* - A two-letter ISO 639 code (e.g., "en", "fr")
|
|
528
|
+
* - A three-letter code for languages without the two-letter equivalent (e.g., "haw", "yue")
|
|
529
|
+
* - A language tag with region (e.g., "en-US", "pt-BR")
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* ```javascript
|
|
533
|
+
* // Force surveys to display in French
|
|
534
|
+
* Survicate.setSurveyLanguage('fr');
|
|
535
|
+
*
|
|
536
|
+
* // Force surveys to display in Brazilian Portuguese
|
|
537
|
+
* Survicate.setSurveyLanguage('pt-BR');
|
|
538
|
+
* ```
|
|
539
|
+
*
|
|
540
|
+
* @param languageTag - IETF language tag to force for all surveys
|
|
541
|
+
*/
|
|
542
|
+
setSurveyLanguage: (languageTag: string) => void;
|
|
543
|
+
|
|
492
544
|
/**
|
|
493
545
|
* Set visitor traits/attributes for targeting and identification
|
|
494
546
|
*
|