-
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.
Adds support for Analytics for Yext Pages
Also updates the main AnalyticsConfig, AnalyticsReporter, etc. to be aliases for SearchAnayticsConfig, SearchAnalytics Reporter, etc. in order to differentiate between the Pages & Search focused parts of the library. Additionally, introduces console debugging support enabled when the `debug` option is set. T=unit & manual Unit tests added for the new PagesAnalyticsReporter. Manually testing done by updating the test-site to add the new provider, fire a page view, and add a button to test click events. Co-authored-by: Ben McGinnis <bmcginnis@yext.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
3d23f4a
commit 90e1daa
Showing
143 changed files
with
1,982 additions
and
368 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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) > [BaseAnalyticsConfig](./analytics.baseanalyticsconfig.md) > [businessId](./analytics.baseanalyticsconfig.businessid.md) | ||
|
||
## BaseAnalyticsConfig.businessId property | ||
|
||
Your Yext Account ID Can be easily found from the url of your homepage of your Yext account e.g. https://www.yext.com/s/\[businessId\]/home | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
businessId: 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
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) > [BaseAnalyticsConfig](./analytics.baseanalyticsconfig.md) > [debug](./analytics.baseanalyticsconfig.debug.md) | ||
|
||
## BaseAnalyticsConfig.debug property | ||
|
||
Turn on analytics event logging in the console | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
debug?: boolean; | ||
``` |
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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [BaseAnalyticsConfig](./analytics.baseanalyticsconfig.md) | ||
|
||
## BaseAnalyticsConfig interface | ||
|
||
Base analytics configuration | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface BaseAnalyticsConfig | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [businessId](./analytics.baseanalyticsconfig.businessid.md) | number | Your Yext Account ID Can be easily found from the url of your homepage of your Yext account e.g. https://www.yext.com/s/\[businessId\]/home | | ||
| [debug?](./analytics.baseanalyticsconfig.debug.md) | boolean | <i>(Optional)</i> Turn on analytics event logging in the console | | ||
| [visitor?](./analytics.baseanalyticsconfig.visitor.md) | [Visitor](./analytics.visitor.md) | <i>(Optional)</i> Information used to associate analytics with a particular user. | | ||
|
4 changes: 2 additions & 2 deletions
4
docs/analytics.analyticsconfig.visitor.md → .../analytics.baseanalyticsconfig.visitor.md
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) > [CtaClick](./analytics.ctaclick.md) | ||
|
||
## CtaClick variable | ||
|
||
A Pages CTA Event | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
CtaClick: PagesAnalyticsEvent | ||
``` |
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,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [DefaultPagesEventNames](./analytics.defaultpageseventnames.md) | ||
|
||
## DefaultPagesEventNames enum | ||
|
||
Default pages analytics event types. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare enum DefaultPagesEventNames | ||
``` | ||
|
||
## Enumeration Members | ||
|
||
| Member | Value | Description | | ||
| --- | --- | --- | | ||
| CTA | <code>"CTA_CLICK"</code> | | | ||
| DrivingDirection | <code>"DRIVING_DIRECTIONS"</code> | | | ||
| PageView | <code>"PAGE_VIEW"</code> | | | ||
| PhoneCall | <code>"CALL"</code> | | | ||
| Website | <code>"WEBSITE"</code> | | | ||
|
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) > [DirectoryPage](./analytics.directorypage.md) > [directoryId](./analytics.directorypage.directoryid.md) | ||
|
||
## DirectoryPage.directoryId property | ||
|
||
The name of the directory page feature, may be from the 'name' property of your feature in features.json or the name of your page template file if you are using yext/pages to implement your page. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
directoryId: 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,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [DirectoryPage](./analytics.directorypage.md) > [id](./analytics.directorypage.id.md) | ||
|
||
## DirectoryPage.id property | ||
|
||
Yext Internal ID of Entities to Track. May come from meta.id or the uid parameter of a stream document | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
id: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [DirectoryPage](./analytics.directorypage.md) | ||
|
||
## DirectoryPage interface | ||
|
||
Represents the analytics parameters required to track events on a directory page | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface DirectoryPage extends PageType | ||
``` | ||
<b>Extends:</b> [PageType](./analytics.pagetype.md) | ||
## Properties | ||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [directoryId](./analytics.directorypage.directoryid.md) | string | The name of the directory page feature, may be from the 'name' property of your feature in features.json or the name of your page template file if you are using yext/pages to implement your page. | | ||
| [id](./analytics.directorypage.id.md) | number | Yext Internal ID of Entities to Track. May come from meta.id or the uid parameter of a stream document | | ||
| [name](./analytics.directorypage.name.md) | 'directory' | The string name of the page type | | ||
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) > [DirectoryPage](./analytics.directorypage.md) > [name](./analytics.directorypage.name.md) | ||
|
||
## DirectoryPage.name property | ||
|
||
The string name of the page type | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
readonly name: 'directory'; | ||
``` |
Oops, something went wrong.