Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventsSDK: Add originalEventName to EventPayload #138

Merged
merged 9 commits into from
Feb 28, 2024
Merged
2 changes: 1 addition & 1 deletion docs/analytics.eventpayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface EventPayload
| [label?](./analytics.eventpayload.label.md) | | string | _(Optional)_ A label assigned to the event, e.g. a CTA label. |
| [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 autogenerated 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. For more information see https://www.iso.org/iso-3166-country-codes.html.</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) | | { scope?: string; siteUid?: number; template?: string; } | _(Optional)_ Fields specific to reporting Yext Pages Analytics Events |
| [pages?](./analytics.eventpayload.pages.md) | | { scope?: string; originalEventName?: string; 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>Referrer</code> header from the autogenerated request headers.</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>Referrer</code> header from the autogenerated request headers.</p> |
| [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 |
Expand Down
1 change: 1 addition & 0 deletions docs/analytics.eventpayload.pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Fields specific to reporting Yext Pages Analytics Events
```typescript
pages?: {
scope?: string;
originalEventName?: string;
siteUid?: number;
template?: string;
};
Expand Down
1 change: 1 addition & 0 deletions etc/analytics.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export interface EventPayload {
location?: Coordinates | string;
pages?: {
scope?: string;
originalEventName?: string;
siteUid?: number;
template?: string;
};
Expand Down
2 changes: 2 additions & 0 deletions src/EventPayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export interface EventPayload {
pages?: {
/** The scope of an action. Applies to Pages events. */
scope?: string;
/** The Event name as it was used in previous analytics implementations. */
originalEventName?: string;
/* The UID of the site an event was tied to. */
siteUid?: number;
/* The ID of the template from which a site was generated. */
Expand Down
Loading