Classes
Constants
- CATEGORY_LABELS :
Object.<TrackingCategory, string>
Typedefs
- FetchResult :
object
- MockFetch ⇒
Promise.<FetchResult>
- GAOptions :
object
GA4
Kind: global class
Implements: IAnalyticsStorage
new GA4(options)
Param | Type |
---|---|
options | GAOptions |
IGALogger
gA4._logger : Kind: instance property of GA4
gA4.setDefaultLogger(logger)
Kind: instance method of GA4
Param | Type |
---|---|
logger | IGALogger |
Promise
gA4.createUserSession(pageId, senderId, sessionId, [metadata], [ts], [nonInteractive]) ⇒ Kind: instance method of GA4
Param | Type | Default |
---|---|---|
pageId | string | |
senderId | string | |
sessionId | string | |
[metadata] | SessionMetadata | |
[ts] | number | |
[nonInteractive] | boolean | false |
Promise
gA4.storeEvents(pageId, senderId, sessionId, events, [user], [ts]) ⇒ Kind: instance method of GA4
Param | Type | Default |
---|---|---|
pageId | string | |
senderId | string | |
sessionId | string | |
events | Array.<Event> | |
[user] | GAUser |
|
[ts] | number |
GA4
Kind: global class
new GA4(options)
Param | Type |
---|---|
options | GAOptions |
IGALogger
gA4._logger : Kind: instance property of GA4
gA4.setDefaultLogger(logger)
Kind: instance method of GA4
Param | Type |
---|---|
logger | IGALogger |
Promise
gA4.createUserSession(pageId, senderId, sessionId, [metadata], [ts], [nonInteractive]) ⇒ Kind: instance method of GA4
Param | Type | Default |
---|---|---|
pageId | string | |
senderId | string | |
sessionId | string | |
[metadata] | SessionMetadata | |
[ts] | number | |
[nonInteractive] | boolean | false |
Promise
gA4.storeEvents(pageId, senderId, sessionId, events, [user], [ts]) ⇒ Kind: instance method of GA4
Param | Type | Default |
---|---|---|
pageId | string | |
senderId | string | |
sessionId | string | |
events | Array.<Event> | |
[user] | GAUser |
|
[ts] | number |
enum
ResponseFlag : Kind: global enum
Properties
Name | Type | Default | Description |
---|---|---|---|
DISAMBIGUATION_SELECTED | string | "d" | Disambiguation quick reply was selected |
DISAMBIGUATION_OFFERED | string | "o" | Disambiguation occured - user was asked to choose the right meaning |
DO_NOT_LOG | string | "!" | Do not log the event |
HANDOVER | string | "h" | Handover occurred |
enum
TrackingType : Kind: global enum
Properties
Name | Type | Default |
---|---|---|
CONVERSATION_EVENT | string | "conversation" |
TRAINING | string | "train" |
PAGE_VIEW | string | "page_view" |
REPORT | string | "report" |
enum
TrackingCategory : TrackingCategory
Kind: global enum
Properties
Name | Type | Default |
---|---|---|
PAGE_VIEW_FIRST | string | "pf" |
PAGE_VIEW_SUBSEQUENT | string | "pp" |
STICKER | string | "sti" |
IMAGE | string | "img" |
LOCATION | string | "loc" |
ATTACHMENT | string | "att" |
TEXT | string | "txt" |
QUICK_REPLY | string | "qr" |
OPT_IN | string | "oin" |
REFERRAL | string | "ref" |
POSTBACK_BUTTON | string | "btn" |
URL_LINK | string | "url" |
OTHER | string | "oth" |
HANDOVER_TO_BOT | string | "bot" |
INTENT_DETECTION | string | "int" |
DISAMBIGUATION_SELECTED | string | "dis" |
DISAMBIGUATION_OFFERED | string | "dio" |
REPORT_FEEDBACK | string | "fdb" |
HANDOVER_OCCURRED | string | "hum" |
Object.<TrackingCategory, string>
CATEGORY_LABELS : Kind: global constant
object
FetchResult : Kind: global typedef
Param | Type |
---|---|
status | number |
[statusText] | string |
json | Promise.<object> |
Promise.<FetchResult>
MockFetch ⇒ Kind: global typedef
Param | Type |
---|---|
url | string |
[options] | RequestInit |
object
GAOptions : Kind: global typedef
Properties
Name | Type |
---|---|
measurementId | string |
apiSecret | string |
[debug] | boolean |
[log] | IGALogger |
[fetch] | MockFetch |