Skip to content

Commit

Permalink
Merge 0f89992 into 7fe1b1f
Browse files Browse the repository at this point in the history
  • Loading branch information
ejaffee01 committed Feb 27, 2024
2 parents 7fe1b1f + 0f89992 commit a7eab96
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 22 deletions.
2 changes: 2 additions & 0 deletions docs/analytics.eventpayload.bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Whether the event is the result of bot activity.

If not specified the system will automatically detect whether this event originates from a bot.

**Signature:**

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs/analytics.eventpayload.browseragent.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Information about the visitors device and browser.

If not specified the system will automatically detect the values from request headers or `userAgent` property.

**Signature:**

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs/analytics.eventpayload.locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

The locale of the user who generated the event.

If not specified the system will automatically determine the locale from the Accept-Language header.

**Signature:**

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs/analytics.eventpayload.location.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

The location information of the visitor for the event. Either a Coordinates object with both latitude and longitude or a string with the country of the visitor for the event, as a ISO 3166-1 alpha-2 country code.

If not specified the system will automatically determine all location information from the request's IP address, or the value of the `ip` property if specified.

**Signature:**

```typescript
Expand Down
14 changes: 11 additions & 3 deletions docs/analytics.eventpayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export interface EventPayload
| --- | --- | --- | --- |
| [action?](./analytics.eventpayload.action.md) | | [Action](./analytics.action.md) | _(Optional)_ The user action which caused the event, e.g. ADD\_TO\_CART, THUMBS\_UP, C\_CUSTOM\_ACTION |
| [authorization?](./analytics.eventpayload.authorization.md) | | string | _(Optional)_ The authorization token for the request. This will be setup from the Key or Bearer in the config. |
| [bot?](./analytics.eventpayload.bot.md) | | boolean | _(Optional)_ Whether the event is the result of bot activity. |
| [browserAgent?](./analytics.eventpayload.browseragent.md) | | { browser?: string; browserVersion?: string; device?: string; deviceClass?: string; os?: string; osVersion?: string; userAgent?: string; } | _(Optional)_ Information about the visitors device and browser. |
| [bot?](./analytics.eventpayload.bot.md) | | boolean | <p>_(Optional)_ Whether the event is the result of bot activity.</p><p>If not specified the system will automatically detect whether this event originates from a bot.</p> |
| [browserAgent?](./analytics.eventpayload.browseragent.md) | | { browser?: string; browserVersion?: string; device?: string; deviceClass?: string; os?: string; osVersion?: string; userAgent?: string; } | <p>_(Optional)_ Information about the visitors device and browser.</p><p>If not specified the system will automatically detect the values from request headers or <code>userAgent</code> property.</p> |
| [chat?](./analytics.eventpayload.chat.md) | | { botId: string; conversationId?: string; responseId?: string; } | _(Optional)_ Fields specific to reporting Chat Analytics Events |
| [clientSdk?](./analytics.eventpayload.clientsdk.md) | | Record&lt;string, string&gt; | _(Optional)_ For the Yext client SDKs involved in the event, this is an object mapping the names of those SDKs to the version labels of those SDKs. |
| [count?](./analytics.eventpayload.count.md) | | number | _(Optional)_ When the record summarizes multiple events, the number of events the record represents. The event is treated as if it is duplicated this many times. |
Expand All @@ -30,15 +30,23 @@ export interface EventPayload
| [internalUser?](./analytics.eventpayload.internaluser.md) | | boolean | _(Optional)_ Indicates whether the event is the result of internal activity. |
| [ip?](./analytics.eventpayload.ip.md) | | { address: string; algorithm: string; } | _(Optional)_ The IP address for the event. |
| [label?](./analytics.eventpayload.label.md) | | string | _(Optional)_ A label assigned to the event, e.g. a CTA label. |
<<<<<<< HEAD
| [locale?](./analytics.eventpayload.locale.md) | | string | _(Optional)_ The locale of the user who generated the event. |
| [location?](./analytics.eventpayload.location.md) | | Coordinates \| string | _(Optional)_ The location information of the visitor for the event. Either a Coordinates object with both latitude and longitude or a string with the country of the visitor for the event, as a ISO 3166-1 alpha-2 country code. |
| [pages?](./analytics.eventpayload.pages.md) | | { scope?: string; siteUid?: number; template?: string; } | _(Optional)_ Fields specific to reporting Yext Pages Analytics Events |
| [pageUrl?](./analytics.eventpayload.pageurl.md) | | string | _(Optional)_ The URL of the page where the event occurred |
| [referrerUrl?](./analytics.eventpayload.referrerurl.md) | | string | _(Optional)_ The URL of the page which the visitor came from prior to the event. |
=======
| [locale?](./analytics.eventpayload.locale.md) | | string | <p>_(Optional)_ The locale of the user who generated the event.</p><p>If not specified the system will automatically determine the locale from the Accept-Language header.</p> |
| [location?](./analytics.eventpayload.location.md) | | Coordinates \| string | <p>_(Optional)_ The location information of the visitor for the event. Either a Coordinates object with both latitude and longitude or a string with the country of the visitor for the event, as a ISO 3166-1 alpha-2 country code.</p><p>If not specified the system will automatically determine all location information from the request's IP address, or the value of the <code>ip</code> property if specified.</p> |
| [pages?](./analytics.eventpayload.pages.md) | | { siteUid?: number; template?: string; } | _(Optional)_ Fields specific to reporting Yext Pages Analytics Events |
| [pageUrl?](./analytics.eventpayload.pageurl.md) | | string | <p>_(Optional)_ The URL of the page where the event occurred.</p><p>If not specified the system will automatically use the <code>Referer</code> header of the request.</p> |
| [referrerUrl?](./analytics.eventpayload.referrerurl.md) | | string | <p>_(Optional)_ The URL of the page which the visitor came from prior to the event.</p><p>If not specified the system will automatically use the <code>Referer</code> header of the request.</p> |
>>>>>>> 13bbe96 (Automated update to repo's documentation from github action)
| [search?](./analytics.eventpayload.search.md) | | { searchId?: string; queryId?: string; verticalKey?: string; isDirectAnswer?: boolean; versionLabel?: [VersionLabel](./analytics.versionlabel.md)<!-- -->; versionNumber?: number; experienceKey: string; } | _(Optional)_ Fields specific to reporting Yext Search Analytics Events |
| [searchTerm?](./analytics.eventpayload.searchterm.md) | | string | _(Optional)_ |
| [sessionId?](./analytics.eventpayload.sessionid.md) | | string \| null | _(Optional)_ Unique identifier to tie together events in a single browsing session |
| [timestamp?](./analytics.eventpayload.timestamp.md) | | Date \| string | _(Optional)_ The timestamp at which the event occurred, in ISO format. |
| [timestamp?](./analytics.eventpayload.timestamp.md) | | Date \| string | <p>_(Optional)_ The timestamp at which the event occurred, in ISO format.</p><p>If not specified the system will automatically use the time when the request was received as the event timestamp.</p> |
| [value?](./analytics.eventpayload.value.md) | | { amount: number; currency: string; } | _(Optional)_ The monetary value of the event. |
| [visitor?](./analytics.eventpayload.visitor.md) | | Record&lt;string, string&gt; | _(Optional)_ Information used to associate analytics with a particular user. |

4 changes: 3 additions & 1 deletion docs/analytics.eventpayload.pageurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

## EventPayload.pageUrl property

The URL of the page where the event occurred
The URL of the page where the event occurred.

If not specified the system will automatically use the `Referer` header of the request.

**Signature:**

Expand Down
2 changes: 2 additions & 0 deletions docs/analytics.eventpayload.referrerurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

The URL of the page which the visitor came from prior to the event.

If not specified the system will automatically use the `Referer` header of the request.

**Signature:**

```typescript
Expand Down
2 changes: 2 additions & 0 deletions docs/analytics.eventpayload.timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

The timestamp at which the event occurred, in ISO format.

If not specified the system will automatically use the time when the request was received as the event timestamp.

**Signature:**

```typescript
Expand Down
73 changes: 55 additions & 18 deletions src/EventPayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ export interface EventPayload {
action?: Action;
/** The authorization token for the request. This will be setup from the Key or Bearer in the config. */
authorization?: string;
/** Whether the event is the result of bot activity. */
/** Whether the event is the result of bot activity.
*
* If not specified the system will automatically detect whether
* this event originates from a bot.
*/
bot?: boolean;
/** Information about the visitors device and browser. */
/** Information about the visitors device and browser.
*
* If not specified the system will automatically detect
* the values from request headers or `userAgent` property.
*/
browserAgent?: {
/** The browser associated with the event. */
browser?: string;
Expand Down Expand Up @@ -71,22 +79,52 @@ export interface EventPayload {
internalUser?: boolean;
/** The IP address for the event.*/
ip?: {
/** The IPv4 address associated with the event. */
/** The IPv4 address associated with the event.
*
* If not specified the system will use the Source IP address
* from the IP header of the request.
*/
address: string;
/** The algorithm to use to anonymize the IP address after collection. */
algorithm: string;
};
/** A label assigned to the event, e.g. a CTA label. */
label?: string;
/** The locale of the user who generated the event. */
/** The locale of the user who generated the event.
*
* If not specified the system will automatically
* determine the locale from the Accept-Language header.
*/
locale?: string;
/** The location information of the visitor for the event.
* Either a Coordinates object with both latitude and longitude or a string
* with the country of the visitor for the event, as a ISO 3166-1 alpha-2 country code. */
* with the country of the visitor for the event, as a ISO 3166-1 alpha-2 country code.
*
* If not specified the system will automatically
* determine all location information from the request's IP address,
* or the value of the `ip` property if specified.
*/
location?: Coordinates | string;
/** The URL of the page where the event occurred */
/** Fields specific to reporting Yext Pages Analytics Events */
pages?: {
/** The scope of an action. Applies to Pages events. */
scope?: string;
/* The UID of the site an event was tied to. */
siteUid?: number;
/* The ID of the template from which a site was generated. */
template?: string;
};
/** The URL of the page where the event occurred.
*
* If not specified the system will automatically
* use the `Referrer` header from the auto-generated request headers.
*/
pageUrl?: string;
/** The URL of the page which the visitor came from prior to the event. */
/** The URL of the page which the visitor came from prior to the event.
*
* If not specified the system will automatically
* use the `Referrer` header from the auto-generated request headers.
*/
referrerUrl?: string;
/** Fields specific to reporting Yext Search Analytics Events */
search?: {
Expand All @@ -109,22 +147,21 @@ export interface EventPayload {
searchTerm?: string;
/** Unique identifier to tie together events in a single browsing session */
sessionId?: string | null;
/** Fields specific to reporting Yext Pages Analytics Events */
pages?: {
/** The scope of an action. Applies to Pages events. */
scope?: string;
/* The UID of the site an event was tied to. */
siteUid?: number;
/* The ID of the template from which a site was generated. */
template?: string;
};
/** The timestamp at which the event occurred, in ISO format. */
/** The timestamp at which the event occurred, in ISO format.
* For example, September 27, 2022 at 6 p.m. is represented as
* 2022-09-27 18:00:00.000.
*
* If not specified the system will automatically
* use the time when the request was received as the event timestamp.
*/
timestamp?: Date | string;
/** The monetary value of the event. */
value?: {
/** The monetary value. */
amount: number;
/** The ISO 4217 currency code of the currency the value is expressed in. */
/** The ISO 4217 currency code of the currency the value is expressed in.
* For example, "USD" for US dollars.
*/
currency: string;
};
/**
Expand Down

0 comments on commit a7eab96

Please sign in to comment.