@uxf/analytics 11.82.0 → 11.82.1
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
CHANGED
|
@@ -34,8 +34,11 @@ type GetServerSidePropsContext = {
|
|
|
34
34
|
type GetServerSidePropsResult<P> = {
|
|
35
35
|
props: P;
|
|
36
36
|
};
|
|
37
|
+
type CookieOptions = {
|
|
38
|
+
domain?: string;
|
|
39
|
+
};
|
|
37
40
|
export declare function getExperimentVariant(config: ExperimentConfig, randomNumberForTesting?: number | null): ExperimentVariant | null;
|
|
38
|
-
export declare function handleABTesting(request: NextRequest, response: NextResponse, experiments: ExperimentConfig[]): void;
|
|
41
|
+
export declare function handleABTesting(request: NextRequest, response: NextResponse, experiments: ExperimentConfig[], options?: CookieOptions): void;
|
|
39
42
|
export declare function getExperimentsFromContext(cookies: Partial<{
|
|
40
43
|
[p: string]: string;
|
|
41
44
|
}>): [string, string][];
|
|
@@ -49,8 +49,8 @@ function removeOldExperimentsCookies(request, response, experiments) {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function handleABTesting(request, response, experiments) {
|
|
53
|
-
experiments.forEach((experimentConfig) => handleExperimentCookie(request, response, experimentConfig));
|
|
52
|
+
function handleABTesting(request, response, experiments, options = {}) {
|
|
53
|
+
experiments.forEach((experimentConfig) => handleExperimentCookie(request, response, experimentConfig, options));
|
|
54
54
|
removeOldExperimentsCookies(request, response, experiments);
|
|
55
55
|
}
|
|
56
56
|
function getExperimentsFromContext(cookies) {
|