-
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.
implements conversion tracking for pages
- Loading branch information
1 parent
675f859
commit 383ab4b
Showing
18 changed files
with
290 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* URL Parameter & Param name for Yext conversion pixels | ||
* | ||
* @public | ||
*/ | ||
export const COOKIE_PARAM = '_yfpc'; | ||
export const DEFAULT_CONVERSION_TRACKING_DOMAIN = 'realtimeanalytics.yext.com'; |
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,14 @@ | ||
/** | ||
* Shared properties of both ConversionEvent and ListingsClickEvent | ||
*/ | ||
export interface CommonConversionData { | ||
/** | ||
* A cookie id from a first party cookie (i.e. from a visit to a domain you control) | ||
*/ | ||
cookieId: string | ||
|
||
/** | ||
* Page which sent the user to the current page, comes from typically Document.referrer | ||
*/ | ||
referrer?: 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 @@ | ||
/** | ||
* The details of an individual conversion event, without the cookie id. | ||
*/ | ||
export interface ConversionDetails { | ||
/** | ||
* The id of the conversion tag, you can find the value from the conversion tracking section in your | ||
* Yext account. You can find a list of tags under: | ||
* https://www.yext.com/s/[your business id]/reports/conversiontracking/setup | ||
*/ | ||
cid: string | ||
|
||
/** | ||
* Conversion Value Optional custom value supplied for this conversion | ||
*/ | ||
cv?: 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 |
---|---|---|
@@ -1,33 +1,10 @@ | ||
import { CommonConversionData } from './CommonConversionData'; | ||
import { ConversionDetails } from './ConversionDetails'; | ||
|
||
/** | ||
* An event representing a Conversion | ||
* | ||
* @public | ||
*/ | ||
export interface ConversionEvent { | ||
/** | ||
* The id of the conversion tag, you can find the value from the conversion tracking section in your | ||
* Yext account. You can find a list of tags under: | ||
* https://www.yext.com/s/[your business id]/reports/conversiontracking/setup | ||
*/ | ||
cid: string | ||
|
||
/** | ||
* Conversion Value Optional custom value supplied for this conversion | ||
*/ | ||
cv?: string | ||
|
||
/** | ||
* A cookie id from a first party cookie (i.e. from a visit to a domain you control) | ||
*/ | ||
firstPartyCookieId?: string | ||
|
||
/** | ||
* Page went sent the user to the current page | ||
*/ | ||
referrer?: string | ||
|
||
/** | ||
* A cookie id from a third party, e.g. a Yext listings publisher | ||
*/ | ||
thirdPartyCookieId?: string | ||
export interface ConversionEvent extends CommonConversionData, ConversionDetails { | ||
} |
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 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export { ListingsClickEvent } from './ListingsClickEvent'; | ||
export { ConversionEvent } from './ConversionEvent'; | ||
export { CookieParam } from './constants'; | ||
export { ConversionEvent } from './ConversionEvent'; |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './events'; | ||
export * from './PageTypes'; | ||
export * from './PageTypes'; |
Oops, something went wrong.