@@ -45,6 +45,20 @@ export class OdpConfig {
4545 return this . _apiKey ;
4646 }
4747
48+ /**
49+ * Url for sending events via pixel.
50+ * @private
51+ */
52+ private _pixelUrl : string ;
53+
54+ /**
55+ * Getter to retrieve the ODP pixel URL
56+ * @public
57+ */
58+ get pixelUrl ( ) : string {
59+ return this . _pixelUrl ;
60+ }
61+
4862 /**
4963 * All ODP segments used in the current datafile (associated with apiHost/apiKey).
5064 * @private
@@ -59,9 +73,10 @@ export class OdpConfig {
5973 return this . _segmentsToCheck ;
6074 }
6175
62- constructor ( apiKey ?: string , apiHost ?: string , segmentsToCheck ?: string [ ] ) {
76+ constructor ( apiKey ?: string , apiHost ?: string , pixelUrl ?: string , segmentsToCheck ?: string [ ] ) {
6377 this . _apiKey = apiKey ?? '' ;
6478 this . _apiHost = apiHost ?? '' ;
79+ this . _pixelUrl = pixelUrl ?? '' ;
6580 this . _segmentsToCheck = segmentsToCheck ?? [ ] ;
6681 }
6782
@@ -76,6 +91,7 @@ export class OdpConfig {
7691 } else {
7792 if ( config . apiKey ) this . _apiKey = config . apiKey ;
7893 if ( config . apiHost ) this . _apiHost = config . apiHost ;
94+ if ( config . pixelUrl ) this . _pixelUrl = config . pixelUrl ;
7995 if ( config . segmentsToCheck ) this . _segmentsToCheck = config . segmentsToCheck ;
8096
8197 return true ;
@@ -98,6 +114,7 @@ export class OdpConfig {
98114 return (
99115 this . _apiHost === configToCompare . _apiHost &&
100116 this . _apiKey === configToCompare . _apiKey &&
117+ this . _pixelUrl === configToCompare . _pixelUrl &&
101118 checkArrayEquality ( this . segmentsToCheck , configToCompare . _segmentsToCheck )
102119 ) ;
103120 }
0 commit comments