@epigraph/epigraph-std-lib 4.4.1 → 4.5.0-alpha
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 +68 -68
- package/dist/EpigraphLibs/EpigraphAnalytics/analytics-event-interface.d.ts +12 -7
- package/dist/EpigraphLibs/EpigraphAnalytics/analytics-plugin-interface.d.ts +15 -4
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs +2 -2
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.d.ts +14 -7
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +478 -180
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalyticsEventLibrary.d.ts +90 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/generics/queue.d.ts +3 -3
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/ga4-analytics-plugin.d.ts +28 -15
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/nexus-analytics-plugin.d.ts +23 -7
- package/dist/epigraph-std-lib.cjs +1 -1
- package/dist/epigraph-std-lib.js +59 -38
- package/package.json +41 -41
- package/dist/EpigraphLibs/EpigraphAnalytics/plugins/ga3-analytics-plugin.d.ts +0 -44
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { IAnalyticsEvent, IAnalyticsParameterItems } from './analytics-event-interface';
|
|
2
|
+
declare class BaseAnalyticsEvent implements IAnalyticsEvent {
|
|
3
|
+
readonly eventName: string;
|
|
4
|
+
interactiveEvent: boolean;
|
|
5
|
+
customParameters: Record<string, unknown>;
|
|
6
|
+
constructor({ eventName, interactiveEvent, customParameters }: {
|
|
7
|
+
eventName: string;
|
|
8
|
+
interactiveEvent: boolean;
|
|
9
|
+
customParameters: Record<string, unknown>;
|
|
10
|
+
});
|
|
11
|
+
getGa4Parameters(solution: string, experienceId: string): {
|
|
12
|
+
solution: string;
|
|
13
|
+
experience_id: string;
|
|
14
|
+
interactive_event: boolean;
|
|
15
|
+
items: never[];
|
|
16
|
+
epg_event_tag: string;
|
|
17
|
+
};
|
|
18
|
+
getGTMParameters(): {};
|
|
19
|
+
getNexusParameters(): {
|
|
20
|
+
interactive_event: boolean;
|
|
21
|
+
items: never[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare class EpigraphArRequestedEvent extends BaseAnalyticsEvent {
|
|
25
|
+
constructor(items?: IAnalyticsParameterItems);
|
|
26
|
+
}
|
|
27
|
+
export declare class EpigraphModuleLoadingEvent extends BaseAnalyticsEvent {
|
|
28
|
+
constructor(items: IAnalyticsParameterItems | undefined, isPreConfig: boolean);
|
|
29
|
+
}
|
|
30
|
+
export declare class EpigraphModuleReadyEvent extends BaseAnalyticsEvent {
|
|
31
|
+
constructor(items: IAnalyticsParameterItems | undefined, isPreConfig: boolean, loadTimeMs: number);
|
|
32
|
+
}
|
|
33
|
+
export declare class EpigraphModuleFailedEvent extends BaseAnalyticsEvent {
|
|
34
|
+
constructor(items: IAnalyticsParameterItems | undefined, isPreConfig: boolean, loadTimeMs: number, errorType: string);
|
|
35
|
+
}
|
|
36
|
+
export declare class EpigraphModuleClosedEvent extends BaseAnalyticsEvent {
|
|
37
|
+
constructor(items?: IAnalyticsParameterItems);
|
|
38
|
+
}
|
|
39
|
+
export declare class EpigraphSupportDetectedEvent extends BaseAnalyticsEvent {
|
|
40
|
+
constructor(items: IAnalyticsParameterItems | undefined, supportType: string, deviceCapabilities?: Record<string, unknown>);
|
|
41
|
+
}
|
|
42
|
+
export declare class EpigraphButtonClickEvent extends BaseAnalyticsEvent {
|
|
43
|
+
constructor(items: IAnalyticsParameterItems | undefined, buttonType: string, buttonName: string);
|
|
44
|
+
}
|
|
45
|
+
export declare class EpigraphPanelOpenedEvent extends BaseAnalyticsEvent {
|
|
46
|
+
constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, panelType: string, triggerSource: string);
|
|
47
|
+
}
|
|
48
|
+
export declare class EpigraphPanelClosedEvent extends BaseAnalyticsEvent {
|
|
49
|
+
constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, panelType: string, triggerSource: string);
|
|
50
|
+
}
|
|
51
|
+
export declare class EpigraphAddToFavouritesEvent extends BaseAnalyticsEvent {
|
|
52
|
+
constructor(items?: IAnalyticsParameterItems);
|
|
53
|
+
}
|
|
54
|
+
export declare class EpigraphKeyboardInteractionEvent extends BaseAnalyticsEvent {
|
|
55
|
+
constructor(items: IAnalyticsParameterItems | undefined, actionPerformed: string);
|
|
56
|
+
}
|
|
57
|
+
export declare class EpigraphTouchInteractionEvent extends BaseAnalyticsEvent {
|
|
58
|
+
constructor(items: IAnalyticsParameterItems | undefined, interactionType: string);
|
|
59
|
+
}
|
|
60
|
+
export declare class EpigraphItemAddedEvent extends BaseAnalyticsEvent {
|
|
61
|
+
constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, value: number, currency: string, quantity: number);
|
|
62
|
+
}
|
|
63
|
+
export declare class EpigraphItemMovedEvent extends BaseAnalyticsEvent {
|
|
64
|
+
constructor(items?: IAnalyticsParameterItems);
|
|
65
|
+
}
|
|
66
|
+
export declare class EpigraphItemRemovedEvent extends BaseAnalyticsEvent {
|
|
67
|
+
constructor(items: IAnalyticsParameterItems | undefined, currency: string, quantity: number);
|
|
68
|
+
}
|
|
69
|
+
export declare class EpigraphVariantChangedEvent extends BaseAnalyticsEvent {
|
|
70
|
+
constructor(items: IAnalyticsParameterItems | undefined, changeType: string);
|
|
71
|
+
}
|
|
72
|
+
export declare class EpigraphContentSharedEvent extends BaseAnalyticsEvent {
|
|
73
|
+
constructor(items: IAnalyticsParameterItems | undefined, contentType: string, shareDestination: string);
|
|
74
|
+
}
|
|
75
|
+
export declare class EpigraphCheckoutEvent extends BaseAnalyticsEvent {
|
|
76
|
+
constructor(items: Array<any> | undefined, value: number, currency: string);
|
|
77
|
+
}
|
|
78
|
+
export declare class EpigraphConversionEvent extends BaseAnalyticsEvent {
|
|
79
|
+
constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string);
|
|
80
|
+
}
|
|
81
|
+
export declare class EpigraphChangeRateEvent extends BaseAnalyticsEvent {
|
|
82
|
+
constructor(items: IAnalyticsParameterItems | undefined, value: number);
|
|
83
|
+
}
|
|
84
|
+
export declare class EpigraphCompletionRateEvent extends BaseAnalyticsEvent {
|
|
85
|
+
constructor(items: IAnalyticsParameterItems | undefined, value: number);
|
|
86
|
+
}
|
|
87
|
+
export declare class EpigraphEngagementRateEvent extends BaseAnalyticsEvent {
|
|
88
|
+
constructor(items: IAnalyticsParameterItems | undefined, value: number);
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as SLL } from './single-linked-list.js';
|
|
2
|
-
import {
|
|
2
|
+
import { IAnalyticsEvent } from '../analytics-event-interface.ts';
|
|
3
3
|
declare const $queue: unique symbol;
|
|
4
4
|
declare const $size: unique symbol;
|
|
5
5
|
export default class Queue {
|
|
@@ -8,7 +8,7 @@ export default class Queue {
|
|
|
8
8
|
constructor();
|
|
9
9
|
get queue(): SLL;
|
|
10
10
|
get size(): number;
|
|
11
|
-
enqueue(data:
|
|
12
|
-
dequeue():
|
|
11
|
+
enqueue(data: IAnalyticsEvent): void;
|
|
12
|
+
dequeue(): IAnalyticsEvent;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
-
import {
|
|
3
|
-
import { IConsentPlugin } from '../consent-plugin-interface';
|
|
1
|
+
import { AnalyticsStatus, IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
+
import { IAnalyticsEvent } from '../analytics-event-interface';
|
|
4
3
|
declare global {
|
|
5
4
|
interface Window {
|
|
6
5
|
[key: string]: any;
|
|
@@ -10,20 +9,39 @@ export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
|
|
|
10
9
|
name: string;
|
|
11
10
|
pluginName: string;
|
|
12
11
|
trackingID: string;
|
|
12
|
+
solution: string;
|
|
13
|
+
experienceID: string;
|
|
13
14
|
verboseLogging: boolean;
|
|
14
|
-
private queue;
|
|
15
15
|
dataLayer: Array<Record<string, any>>;
|
|
16
16
|
dataLayerName: string | undefined;
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
private
|
|
17
|
+
private __queue;
|
|
18
|
+
private __status;
|
|
19
|
+
private __sentEventCount;
|
|
20
|
+
constructor({ trackingID, experienceID, solution, verboseLogging }: {
|
|
21
|
+
trackingID: string;
|
|
22
|
+
experienceID: string;
|
|
23
|
+
solution: string;
|
|
24
|
+
verboseLogging?: boolean;
|
|
25
|
+
});
|
|
26
|
+
getStatus(): AnalyticsStatus;
|
|
27
|
+
setStatus(newStatus: AnalyticsStatus): void;
|
|
28
|
+
getPendingEventCount(): number;
|
|
29
|
+
getSentEventCount(): number;
|
|
30
|
+
getTotalEventCount(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
33
|
+
*/
|
|
34
|
+
getUniquePluginIdentifier(): string;
|
|
35
|
+
setupPlugin(): void;
|
|
20
36
|
/**
|
|
21
|
-
* This function will send an Event to
|
|
37
|
+
* This function will send an Event to Google Analytics 4.
|
|
22
38
|
*
|
|
23
|
-
* @param eventData
|
|
39
|
+
* @param eventData IAnalyticsEvent The event to be tracked
|
|
24
40
|
* @param consentPlugin
|
|
25
41
|
*/
|
|
26
|
-
sendEvent(
|
|
42
|
+
sendEvent(analyticsEvent: IAnalyticsEvent, consent: boolean): Promise<void>;
|
|
43
|
+
private setupDataLayer;
|
|
44
|
+
private initGtag;
|
|
27
45
|
/**
|
|
28
46
|
* Send all events that are in the queue
|
|
29
47
|
* @private
|
|
@@ -34,11 +52,6 @@ export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
|
|
|
34
52
|
* @param err
|
|
35
53
|
*/
|
|
36
54
|
private logger;
|
|
37
|
-
/**
|
|
38
|
-
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
39
|
-
*/
|
|
40
|
-
getUniquePluginIdentifier(): string;
|
|
41
|
-
setupPlugin(): void;
|
|
42
55
|
private sendGA4LongParameters;
|
|
43
56
|
private findGA4ScriptInfo;
|
|
44
57
|
}
|
|
@@ -1,18 +1,34 @@
|
|
|
1
|
-
import { IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
-
import {
|
|
3
|
-
import { IConsentPlugin } from '../consent-plugin-interface';
|
|
1
|
+
import { AnalyticsStatus, IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
+
import { IAnalyticsEvent } from '../analytics-event-interface';
|
|
4
3
|
export declare class NexusAnalyticsPlugin implements IAnalyticsPlugin {
|
|
5
4
|
name: string;
|
|
6
5
|
pluginName: string;
|
|
7
6
|
trackingID: string;
|
|
7
|
+
experienceID: string;
|
|
8
|
+
solution: string;
|
|
8
9
|
verboseLogging: boolean;
|
|
9
10
|
url: string;
|
|
10
|
-
private queue;
|
|
11
11
|
private readonly sessionId;
|
|
12
12
|
private readonly xPath;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private
|
|
13
|
+
private __queue;
|
|
14
|
+
private __status;
|
|
15
|
+
private __sentEventCount;
|
|
16
|
+
constructor({ trackingID, experienceID, solution, sessionId, xPath, verboseLogging, sendToStaging }: {
|
|
17
|
+
trackingID: string;
|
|
18
|
+
experienceID: string;
|
|
19
|
+
solution: string;
|
|
20
|
+
sessionId: string;
|
|
21
|
+
xPath: string;
|
|
22
|
+
verboseLogging?: boolean;
|
|
23
|
+
sendToStaging?: boolean;
|
|
24
|
+
});
|
|
25
|
+
getStatus(): AnalyticsStatus;
|
|
26
|
+
setStatus(newStatus: AnalyticsStatus): void;
|
|
27
|
+
getPendingEventCount(): number;
|
|
28
|
+
getSentEventCount(): number;
|
|
29
|
+
getTotalEventCount(): number;
|
|
16
30
|
getUniquePluginIdentifier(): string;
|
|
17
31
|
setupPlugin(): void;
|
|
32
|
+
sendEvent(event: IAnalyticsEvent, consent: boolean): Promise<void>;
|
|
33
|
+
private dequeueAndSendEvents;
|
|
18
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./Epigraph/epigraph.cjs"),E=require("./Epigraph/epigraphBaseSolutions.cjs"),e=require("./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs"),r=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),p=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),g=require("./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs"),i=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),t=require("./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs"),a=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs");exports.ENVIRONMENT_TYPE=n.ENVIRONMENT_TYPE;exports.Epigraph=n.Epigraph;exports.EpigraphBaseSolutionHtmlElement=E.EpigraphBaseSolutionHtmlElement;exports.EpigraphBaseSolutionLitElement=E.EpigraphBaseSolutionLitElement;exports.ConsentPluginNames=e.ConsentPluginNames;exports.EpigraphAddToFavouritesEvent=e.EpigraphAddToFavouritesEvent;exports.EpigraphAnalytics=e.EpigraphAnalytics;exports.EpigraphArRequestedEvent=e.EpigraphArRequestedEvent;exports.EpigraphButtonClickEvent=e.EpigraphButtonClickEvent;exports.EpigraphChangeRateEvent=e.EpigraphChangeRateEvent;exports.EpigraphCheckoutEvent=e.EpigraphCheckoutEvent;exports.EpigraphCompletionRateEvent=e.EpigraphCompletionRateEvent;exports.EpigraphContentSharedEvent=e.EpigraphContentSharedEvent;exports.EpigraphConversionEvent=e.EpigraphConversionEvent;exports.EpigraphEngagementRateEvent=e.EpigraphEngagementRateEvent;exports.EpigraphItemAddedEvent=e.EpigraphItemAddedEvent;exports.EpigraphItemMovedEvent=e.EpigraphItemMovedEvent;exports.EpigraphItemRemovedEvent=e.EpigraphItemRemovedEvent;exports.EpigraphKeyboardInteractionEvent=e.EpigraphKeyboardInteractionEvent;exports.EpigraphModuleClosedEvent=e.EpigraphModuleClosedEvent;exports.EpigraphModuleFailedEvent=e.EpigraphModuleFailedEvent;exports.EpigraphModuleLoadingEvent=e.EpigraphModuleLoadingEvent;exports.EpigraphModuleReadyEvent=e.EpigraphModuleReadyEvent;exports.EpigraphPanelClosedEvent=e.EpigraphPanelClosedEvent;exports.EpigraphPanelOpenedEvent=e.EpigraphPanelOpenedEvent;exports.EpigraphSupportDetectedEvent=e.EpigraphSupportDetectedEvent;exports.EpigraphTouchInteractionEvent=e.EpigraphTouchInteractionEvent;exports.EpigraphVariantChangedEvent=e.EpigraphVariantChangedEvent;exports.GA4AnalyticsPlugin=e.GA4AnalyticsPlugin;exports.NexusAnalyticsPlugin=e.NexusAnalyticsPlugin;exports.OneTrustConsentPlugin=e.OneTrustConsentPlugin;exports.EpigraphLogger=r.EpigraphLogger;exports.LogTypes=r.LogTypes;exports.LoggerModeNames=r.LoggerModeNames;exports.EpigraphNexusAPI=p.EpigraphNexusAPI;exports.HTTPMethod=p.HTTPMethod;exports.NexusAPIResourceIdentifier=p.NexusAPIResourceIdentifier;exports.NexusAPIRoutes=p.NexusAPIRoutes;exports.NexusAPIVersions=p.NexusAPIVersions;exports.NexusEndpoints=p.NexusEndpoints;exports.EpigraphQrCodeGenerator=g.EpigraphQrCodeGenerator;exports.Result=i.Result;exports.failureResult=i.failureResult;exports.successResult=i.successResult;exports.Distance=t.Distance;exports.DistanceUnits=t.DistanceUnits;exports.UnitTypes=t.UnitTypes;exports.EpigraphUrlProcessor=a.EpigraphUrlProcessor;exports.QUERY_PARAMETER_ACTION_NAMES=a.QUERY_PARAMETER_ACTION_NAMES;exports.QUERY_PARAMETER_NAMES=a.QUERY_PARAMETER_NAMES;
|
package/dist/epigraph-std-lib.js
CHANGED
|
@@ -1,40 +1,61 @@
|
|
|
1
|
-
import { ENVIRONMENT_TYPE as
|
|
2
|
-
import { EpigraphBaseSolutionHtmlElement as
|
|
3
|
-
import { ConsentPluginNames as
|
|
4
|
-
import { EpigraphLogger as
|
|
5
|
-
import { EpigraphNexusAPI as
|
|
6
|
-
import { EpigraphQrCodeGenerator as
|
|
7
|
-
import { Result as
|
|
8
|
-
import { Distance as
|
|
9
|
-
import { EpigraphUrlProcessor as
|
|
1
|
+
import { ENVIRONMENT_TYPE as p, Epigraph as r } from "./Epigraph/epigraph.js";
|
|
2
|
+
import { EpigraphBaseSolutionHtmlElement as n, EpigraphBaseSolutionLitElement as o } from "./Epigraph/epigraphBaseSolutions.js";
|
|
3
|
+
import { ConsentPluginNames as i, EpigraphAddToFavouritesEvent as g, EpigraphAnalytics as s, EpigraphArRequestedEvent as h, EpigraphButtonClickEvent as u, EpigraphChangeRateEvent as l, EpigraphCheckoutEvent as d, EpigraphCompletionRateEvent as v, EpigraphContentSharedEvent as m, EpigraphConversionEvent as A, EpigraphEngagementRateEvent as R, EpigraphItemAddedEvent as c, EpigraphItemMovedEvent as x, EpigraphItemRemovedEvent as P, EpigraphKeyboardInteractionEvent as N, EpigraphModuleClosedEvent as C, EpigraphModuleFailedEvent as I, EpigraphModuleLoadingEvent as M, EpigraphModuleReadyEvent as T, EpigraphPanelClosedEvent as f, EpigraphPanelOpenedEvent as y, EpigraphSupportDetectedEvent as S, EpigraphTouchInteractionEvent as _, EpigraphVariantChangedEvent as L, GA4AnalyticsPlugin as U, NexusAnalyticsPlugin as O, OneTrustConsentPlugin as B } from "./EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js";
|
|
4
|
+
import { EpigraphLogger as Q, LogTypes as V, LoggerModeNames as Y } from "./EpigraphLibs/EpigraphLogger/epigraphLogger.js";
|
|
5
|
+
import { EpigraphNexusAPI as F, HTTPMethod as G, NexusAPIResourceIdentifier as H, NexusAPIRoutes as b, NexusAPIVersions as q, NexusEndpoints as K } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
|
|
6
|
+
import { EpigraphQrCodeGenerator as w } from "./EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js";
|
|
7
|
+
import { Result as J, failureResult as W, successResult as X } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
|
|
8
|
+
import { Distance as $, DistanceUnits as ee, UnitTypes as te } from "./EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js";
|
|
9
|
+
import { EpigraphUrlProcessor as re, QUERY_PARAMETER_ACTION_NAMES as Ee, QUERY_PARAMETER_NAMES as ne } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
11
|
+
i as ConsentPluginNames,
|
|
12
|
+
$ as Distance,
|
|
13
|
+
ee as DistanceUnits,
|
|
14
|
+
p as ENVIRONMENT_TYPE,
|
|
15
|
+
r as Epigraph,
|
|
16
|
+
g as EpigraphAddToFavouritesEvent,
|
|
17
|
+
s as EpigraphAnalytics,
|
|
18
|
+
h as EpigraphArRequestedEvent,
|
|
19
|
+
n as EpigraphBaseSolutionHtmlElement,
|
|
20
|
+
o as EpigraphBaseSolutionLitElement,
|
|
21
|
+
u as EpigraphButtonClickEvent,
|
|
22
|
+
l as EpigraphChangeRateEvent,
|
|
23
|
+
d as EpigraphCheckoutEvent,
|
|
24
|
+
v as EpigraphCompletionRateEvent,
|
|
25
|
+
m as EpigraphContentSharedEvent,
|
|
26
|
+
A as EpigraphConversionEvent,
|
|
27
|
+
R as EpigraphEngagementRateEvent,
|
|
28
|
+
c as EpigraphItemAddedEvent,
|
|
29
|
+
x as EpigraphItemMovedEvent,
|
|
30
|
+
P as EpigraphItemRemovedEvent,
|
|
31
|
+
N as EpigraphKeyboardInteractionEvent,
|
|
32
|
+
Q as EpigraphLogger,
|
|
33
|
+
C as EpigraphModuleClosedEvent,
|
|
34
|
+
I as EpigraphModuleFailedEvent,
|
|
35
|
+
M as EpigraphModuleLoadingEvent,
|
|
36
|
+
T as EpigraphModuleReadyEvent,
|
|
37
|
+
F as EpigraphNexusAPI,
|
|
38
|
+
f as EpigraphPanelClosedEvent,
|
|
39
|
+
y as EpigraphPanelOpenedEvent,
|
|
40
|
+
w as EpigraphQrCodeGenerator,
|
|
41
|
+
S as EpigraphSupportDetectedEvent,
|
|
42
|
+
_ as EpigraphTouchInteractionEvent,
|
|
43
|
+
re as EpigraphUrlProcessor,
|
|
44
|
+
L as EpigraphVariantChangedEvent,
|
|
45
|
+
U as GA4AnalyticsPlugin,
|
|
46
|
+
G as HTTPMethod,
|
|
47
|
+
V as LogTypes,
|
|
48
|
+
Y as LoggerModeNames,
|
|
49
|
+
H as NexusAPIResourceIdentifier,
|
|
50
|
+
b as NexusAPIRoutes,
|
|
51
|
+
q as NexusAPIVersions,
|
|
52
|
+
O as NexusAnalyticsPlugin,
|
|
53
|
+
K as NexusEndpoints,
|
|
54
|
+
B as OneTrustConsentPlugin,
|
|
55
|
+
Ee as QUERY_PARAMETER_ACTION_NAMES,
|
|
56
|
+
ne as QUERY_PARAMETER_NAMES,
|
|
57
|
+
J as Result,
|
|
58
|
+
te as UnitTypes,
|
|
59
|
+
W as failureResult,
|
|
60
|
+
X as successResult
|
|
40
61
|
};
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@epigraph/epigraph-std-lib",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "./dist/epigraph-std-lib.cjs",
|
|
6
|
-
"module": "./dist/epigraph-std-lib.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"dist/**/*"
|
|
10
|
-
],
|
|
11
|
-
"types": "./dist/epigraph-std-lib.d.ts",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./dist/epigraph-std-lib.d.ts",
|
|
15
|
-
"import": "./dist/epigraph-std-lib.js",
|
|
16
|
-
"require": "./dist/epigraph-std-lib.cjs"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"dev": "vite",
|
|
21
|
-
"build": "tsc -b ./tsconfig.lib.json && vite build",
|
|
22
|
-
"preview": "vite preview",
|
|
23
|
-
"prepublishOnly": "npm run build",
|
|
24
|
-
"test": "npm run build && vitest"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {},
|
|
27
|
-
"peerDependencies": {
|
|
28
|
-
"lit": "^3.2.1",
|
|
29
|
-
"qr-creator": "^1.0.0"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/node": "^22.13.0",
|
|
33
|
-
"happy-dom": "^16.8.1",
|
|
34
|
-
"typescript": "^5.8.2",
|
|
35
|
-
"vite": "^6.0.5",
|
|
36
|
-
"vite-plugin-dts": "^4.5.0",
|
|
37
|
-
"vitest": "^3.0.5",
|
|
38
|
-
"@types/google.analytics": "^0.0.42",
|
|
39
|
-
"@types/gtag.js": "^0.0.20"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@epigraph/epigraph-std-lib",
|
|
3
|
+
"version": "4.5.0-alpha",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/epigraph-std-lib.cjs",
|
|
6
|
+
"module": "./dist/epigraph-std-lib.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"dist/**/*"
|
|
10
|
+
],
|
|
11
|
+
"types": "./dist/epigraph-std-lib.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/epigraph-std-lib.d.ts",
|
|
15
|
+
"import": "./dist/epigraph-std-lib.js",
|
|
16
|
+
"require": "./dist/epigraph-std-lib.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "vite",
|
|
21
|
+
"build": "tsc -b ./tsconfig.lib.json && vite build",
|
|
22
|
+
"preview": "vite preview",
|
|
23
|
+
"prepublishOnly": "npm run build",
|
|
24
|
+
"test": "npm run build && vitest"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"lit": "^3.2.1",
|
|
29
|
+
"qr-creator": "^1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^22.13.0",
|
|
33
|
+
"happy-dom": "^16.8.1",
|
|
34
|
+
"typescript": "^5.8.2",
|
|
35
|
+
"vite": "^6.0.5",
|
|
36
|
+
"vite-plugin-dts": "^4.5.0",
|
|
37
|
+
"vitest": "^3.0.5",
|
|
38
|
+
"@types/google.analytics": "^0.0.42",
|
|
39
|
+
"@types/gtag.js": "^0.0.20"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { IAnalyticsPlugin } from '../analytics-plugin-interface';
|
|
2
|
-
import { AnalyticsEvent } from '../analytics-event-interface';
|
|
3
|
-
export declare class GA3AnalyticsPlugin implements IAnalyticsPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
pluginName: string;
|
|
6
|
-
trackingID: string;
|
|
7
|
-
verboseLogging: boolean;
|
|
8
|
-
private queue;
|
|
9
|
-
private readonly user;
|
|
10
|
-
private readonly trackerName;
|
|
11
|
-
private trackerInterval;
|
|
12
|
-
private trackerCreated;
|
|
13
|
-
constructor(trackingID: string, verboseLogging: boolean, user: string, trackerName: string);
|
|
14
|
-
/**
|
|
15
|
-
* This function will send an Event to GA3.
|
|
16
|
-
*
|
|
17
|
-
* @param eventData AnalyticsEvent The event to be tracked
|
|
18
|
-
*/
|
|
19
|
-
sendEvent(eventData: AnalyticsEvent): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Send all events that are in the queue
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
|
-
private dequeueAndSendEvents;
|
|
25
|
-
/**
|
|
26
|
-
* GA3 requires that a tracker be created prior to being sent. This is called from the constructor. It is
|
|
27
|
-
* important to note that the promise that is inherently returned is ignored in the constructor at this
|
|
28
|
-
* time. This is due to the events that are added will be queued from the page. This script requires
|
|
29
|
-
* that the GA script has been imported on the page already as it does not check for it today.
|
|
30
|
-
*
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
private createTracker;
|
|
34
|
-
/**
|
|
35
|
-
* Checks if verboseLogging is enabled, then logs the error
|
|
36
|
-
* @param err
|
|
37
|
-
*/
|
|
38
|
-
private logger;
|
|
39
|
-
/**
|
|
40
|
-
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
41
|
-
*/
|
|
42
|
-
getUniquePluginIdentifier(): string;
|
|
43
|
-
setupPlugin(): void;
|
|
44
|
-
}
|