-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EventsSDK: Add missing properties to EventPayload & make alphabetical (…
…#117) Added missing properties to event payload: - value - location - Required adding Coordinates type to represent that location can be an object containing latitude or longitude, or be a country string. - nonce - searchTerm In addition rearranged the file to make props in alphabetical order. Testing: - Ran unit and playwright tests and all pass - Looked at official events api schema side by side with this EventPayload and made sure no properties were missing. --------- Co-authored-by: Ethan Jaffee <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
24654a1
commit f44c8e4
Showing
11 changed files
with
332 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [EventPayload](./analytics.eventpayload.md) > [location](./analytics.eventpayload.location.md) | ||
|
||
## EventPayload.location property | ||
|
||
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. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
location?: Coordinates | string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [EventPayload](./analytics.eventpayload.md) > [searchTerm](./analytics.eventpayload.searchterm.md) | ||
|
||
## EventPayload.searchTerm property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
searchTerm?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [EventPayload](./analytics.eventpayload.md) > [value](./analytics.eventpayload.value.md) | ||
|
||
## EventPayload.value property | ||
|
||
The monetary value of the event. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
value?: { | ||
amount: number; | ||
currency: string; | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export type Coordinates = { | ||
coordinates: { | ||
latitude: number; | ||
longitude: number; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Google Tag Manager --> | ||
<script> | ||
(function (w, d, s, l, i) { | ||
w[l] = w[l] || []; | ||
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); | ||
var f = d.getElementsByTagName(s)[0], | ||
j = d.createElement(s), | ||
dl = l != 'dataLayer' ? '&l=' + l : ''; | ||
j.async = true; | ||
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; | ||
f.parentNode.insertBefore(j, f); | ||
})(window, document, 'script', 'dataLayer', 'GTM-5XJN5FXJ'); | ||
</script> | ||
<!-- End Google Tag Manager --> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Analytics Test</title> | ||
</head> | ||
<body> | ||
<!-- Google Tag Manager (noscript) --> | ||
<noscript | ||
><iframe | ||
src="https://www.googletagmanager.com/ns.html?id=GTM-5XJN5FXJ" | ||
height="0" | ||
width="0" | ||
style="display: none; visibility: hidden" | ||
></iframe | ||
></noscript> | ||
<!-- End Google Tag Manager (noscript) --> | ||
<h1>Analytics Test</h1> | ||
<button type="button">Test</button> | ||
</body> | ||
</html> |
Oops, something went wrong.