@pendo/agent 2.307.0 → 2.308.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2789,19 +2789,21 @@ var ConfigReader = (function () {
2789
2789
  function initializeOptions() {
2790
2790
  // Core
2791
2791
  /**
2792
- * When included, all analytics events will be sent to each of the api keys in the list (guide events are
2793
- * only sent to the primary api key). This will only function if there are no `additionalApiKeys` set on
2792
+ * Formerly `additionalApiKeys`. When included, all analytics events will be sent to each of the public app IDs in the list (guide events are
2793
+ * only sent to the primary public app ID). This will only function if there are no `additionalPublicAppIds` set on
2794
2794
  * the configuration included in the downloaded Agent.
2795
2795
  *
2796
2796
  * @access public
2797
2797
  * @category Config/Core
2798
- * @name additionalApiKeys
2798
+ * @name additionalPublicAppIds
2799
2799
  * @default []
2800
2800
  * @type {string[]}
2801
2801
  */
2802
+ addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2802
2803
  addOption('additionalApiKeys', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2803
2804
  addOption('allowedOriginServers');
2804
2805
  addOption('allowedOriginServerHashes');
2806
+ addOption('allowMixedApplicationFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
2805
2807
  addOption('allowMixedApiKeyFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
2806
2808
  /**
2807
2809
  * A function that returns either an array of strings or an object to decorate the url for events.
@@ -2815,15 +2817,16 @@ var ConfigReader = (function () {
2815
2817
  */
2816
2818
  addOption('annotateUrl', [SNIPPET_SRC]);
2817
2819
  /**
2818
- * A primary api key to send data to from the Agent. This will only function if there is no `apiKey` set
2820
+ * Formerly `apiKey`. A primary public app ID to send data to from the Agent. This will only function if there is no `publicAppId` set
2819
2821
  * on the configuration included in the downloaded Agent.
2820
2822
  *
2821
2823
  * @access public
2822
2824
  * @category Config/Core
2823
- * @name apiKey
2825
+ * @name publicAppId
2824
2826
  * @default undefined
2825
2827
  * @type {string}
2826
2828
  */
2829
+ addOption('publicAppId', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2827
2830
  addOption('apiKey', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2828
2831
  addOption('assetHost', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
2829
2832
  /**
@@ -3461,18 +3464,19 @@ var ConfigReader = (function () {
3461
3464
  */
3462
3465
  addOption('inlineStyleNonce', [SNIPPET_SRC]);
3463
3466
  /**
3464
- * Specify a preferred apiKey to lead the multi-apiKey iframe installations to make decisions about automatic
3465
- * guide display. In installations with more than 2 apiKeys, the leaderKey can be specified as a priority
3466
- * list (e.g. `leaderKey: ['key1', 'key2', ...]`). Either all frames must agree on the leaderKey setting,
3467
- * or only one frame should specify the leaderKey. If neither of these conditions are met, the default leader
3467
+ * Formerly `leaderKey` Specify a preferred publicAppId to lead the multi-application iframe installation to make decisions about automatic
3468
+ * guide display. In installations with more than 2 publicAppIds, the leaderApplication can be specified as a priority
3469
+ * list (e.g. `leaderApplication: ['key1', 'key2', ...]`). Either all frames must agree on the leaderApplication setting,
3470
+ * or only one frame should specify the leaderApplication. If neither of these conditions are met, the default leader
3468
3471
  * determination logic (top frame or earliest to join) will be used.
3469
3472
  *
3470
3473
  * @access public
3471
3474
  * @category Config/Guides
3472
- * @name leaderKey
3475
+ * @name leaderApplication
3473
3476
  * @default []
3474
3477
  * @type {string[]}
3475
3478
  */
3479
+ addOption('leaderApplication', [SNIPPET_SRC, PENDO_CONFIG_SRC], []);
3476
3480
  addOption('leaderKey', [SNIPPET_SRC, PENDO_CONFIG_SRC], []);
3477
3481
  /**
3478
3482
  * If `true`, custom code blocks in building block guides will not be allowed to run. Also, classic guides
@@ -3533,6 +3537,8 @@ var ConfigReader = (function () {
3533
3537
  addOption('designerAgentPluginsLoader', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
3534
3538
  addOption('guideContentLoader', [PENDO_CONFIG_SRC]);
3535
3539
  addOption('trainingPartner');
3540
+ addOption('oemAccountId', [SNIPPET_SRC]);
3541
+ addOption('whiteLabelSettings', [PENDO_CONFIG_SRC]);
3536
3542
  // Frustration
3537
3543
  addOption('errorClickLogging', [PENDO_CONFIG_SRC], false);
3538
3544
  // Embedded Guides
@@ -3541,6 +3547,7 @@ var ConfigReader = (function () {
3541
3547
  addOption('formValidation', [PENDO_CONFIG_SRC], false);
3542
3548
  // Performance Metrics
3543
3549
  addOption('performanceMetricsEnabled', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
3550
+ addOption('performanceMetricsSampleRate', [SNIPPET_SRC, PENDO_CONFIG_SRC], 0);
3544
3551
  }
3545
3552
  initializeOptions();
3546
3553
  var sourceGetters = {};
@@ -3905,16 +3912,16 @@ let SERVER = '';
3905
3912
  let ASSET_HOST = '';
3906
3913
  let ASSET_PATH = '';
3907
3914
  let DESIGNER_SERVER = '';
3908
- let VERSION = '2.307.0_';
3909
- let PACKAGE_VERSION = '2.307.0';
3915
+ let VERSION = '2.308.0_';
3916
+ let PACKAGE_VERSION = '2.308.0';
3910
3917
  let LOADER = 'xhr';
3911
3918
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3912
3919
  /**
3913
- * Returns current version of the Agent as a string. Also directly accessible at `pendo.VERSION`.
3920
+ * Returns current version of the Pendo Web SDK as a string. Also directly accessible at `pendo.VERSION`.
3914
3921
  *
3915
3922
  * @access public
3916
- * @category Agent
3917
- * @returns {string} agent version
3923
+ * @category Core
3924
+ * @returns {string} web SDK version
3918
3925
  * @example
3919
3926
  * pendo.getVersion() => '2.150.0'
3920
3927
  */
@@ -5935,7 +5942,7 @@ function get_visitor_id_public() {
5935
5942
  return get_visitor_id() || generate_anonymous_visitor_id();
5936
5943
  }
5937
5944
  /**
5938
- * Sets visitor id for the agent. Requires a valid visitor id string. This will not change
5945
+ * Sets visitor id for the web SDK. Requires a valid visitor id string. This will not change
5939
5946
  * or clear existing visitor metadata set.
5940
5947
  *
5941
5948
  * @access public
@@ -5978,7 +5985,7 @@ var get_account_id = function () {
5978
5985
  return pendo$1.accountId;
5979
5986
  };
5980
5987
  /**
5981
- * Sets account id for the agent without changing existing metadata. However,
5988
+ * Sets account id for the web SDK without changing existing metadata. However,
5982
5989
  * An invalid account id or an explicit `null` value will clear the current account id
5983
5990
  * and account metadata.
5984
5991
  *
@@ -9552,7 +9559,7 @@ var objectToQueryString = function (obj) {
9552
9559
  }, '');
9553
9560
  };
9554
9561
  /**
9555
- * URL getter that will return the URL that will be used by the Agent to describe all data events
9562
+ * URL getter that will return the URL that will be used by the web SDK to describe all data events
9556
9563
  * collected for this app and for Guide requests. This URL can differ from the browser's URL based on
9557
9564
  * customizations made by the host application. The URL customizations can be learned about [here](https://agent.pendo.io/advanced/location).
9558
9565
  *
@@ -9624,6 +9631,23 @@ function treatAsAdoptPartner() {
9624
9631
  // but the agent mechanisms should function identically (at least for now)
9625
9632
  return ConfigReader.get('trainingPartner', false) || adoptAnalyticsForwarding;
9626
9633
  }
9634
+ /**
9635
+ * Adds account ID parameters for adopt partner requests
9636
+ * Note: Caller should check treatAsAdoptPartner() before calling this function
9637
+ * @param {Object} params - Object to add parameters to (queryString, params, etc.)
9638
+ * @param {string} accountId - Account ID to use for 'acc' parameter
9639
+ * @param {string} [oemAccountId] - Optional OEM account ID, should take priority over accountId
9640
+ * @returns {Object} The params object with account parameters added
9641
+ */
9642
+ function addAccountIdParams(params, accountId, oemAccountId) {
9643
+ if (oemAccountId) {
9644
+ params.acc = base64EncodeString(oemAccountId);
9645
+ }
9646
+ else if (accountId && accountId !== 'ACCOUNT-UNIQUE-ID') {
9647
+ params.acc = base64EncodeString(accountId);
9648
+ }
9649
+ return params;
9650
+ }
9627
9651
 
9628
9652
  // other node types can be read about here:
9629
9653
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
@@ -9723,6 +9747,11 @@ function getAbsolutePosition(element, parentElement, _win) {
9723
9747
  var terminalParent = isOffsetParent(parentElement) ? parentElement : getOffsetParent(parentElement, _win);
9724
9748
  var parentRect = terminalParent ? getScreenPosition(terminalParent) : { top: 0, left: 0 };
9725
9749
  var elemRect = getScreenPosition(element);
9750
+ const invertedMatrix2d = calculateInverseTransformMatrix2d(terminalParent);
9751
+ if (invertedMatrix2d) {
9752
+ parentRect = applyMatrix2dRect(invertedMatrix2d, parentRect);
9753
+ elemRect = applyMatrix2dRect(invertedMatrix2d, elemRect);
9754
+ }
9726
9755
  var elementPosition = {
9727
9756
  top: elemRect.top - parentRect.top,
9728
9757
  left: elemRect.left - parentRect.left,
@@ -9769,6 +9798,59 @@ function getScreenPosition(element) {
9769
9798
  height: rect.height || Math.abs(rect.bottom - rect.top)
9770
9799
  };
9771
9800
  }
9801
+ function calculateInverseTransformMatrix2d(element) {
9802
+ if (!element)
9803
+ return;
9804
+ const computedStyle = getComputedStyle_safe(element);
9805
+ const matrix2d = parseCssMatrix(computedStyle.transform);
9806
+ if (matrix2d && /^0px\s+0px/.test(computedStyle.transformOrigin)) {
9807
+ // only consider 2D tranforms that have a computed origin of top left
9808
+ return invertMatrix2d(matrix2d);
9809
+ }
9810
+ }
9811
+ function parseCssMatrix(cssMatrix) {
9812
+ if (!/^matrix\(/.test(cssMatrix))
9813
+ return;
9814
+ return cssMatrix.split(/\(|,|\)/).slice(1, -1).map((v) => parseFloat(v));
9815
+ }
9816
+ function invertMatrix2d([a, b, c, d, e, f]) {
9817
+ const determinant = a * d - b * c;
9818
+ // Matrix is not invertible if determinant is 0
9819
+ if (determinant === 0) {
9820
+ return null;
9821
+ }
9822
+ // Invert the 2D matrix
9823
+ // | a c e |
9824
+ // | b d f |
9825
+ // | 0 0 1 |
9826
+ return [
9827
+ d / determinant,
9828
+ -b / determinant,
9829
+ -c / determinant,
9830
+ a / determinant,
9831
+ (c * f - d * e) / determinant,
9832
+ (b * e - a * f) / determinant
9833
+ ];
9834
+ }
9835
+ function applyMatrix2d([a, b, c, d, e, f], [x, y]) {
9836
+ return [
9837
+ a * x + c * y + e,
9838
+ b * x + d * y + f
9839
+ ];
9840
+ }
9841
+ function applyMatrix2dRect(matrix2d, rect) {
9842
+ const topLeft = applyMatrix2d(matrix2d, [rect.left, rect.top]);
9843
+ const bottomRight = applyMatrix2d(matrix2d, [rect.right, rect.bottom]);
9844
+ const transformedRect = {
9845
+ top: topLeft[1],
9846
+ left: topLeft[0],
9847
+ bottom: bottomRight[1],
9848
+ right: bottomRight[0]
9849
+ };
9850
+ transformedRect.width = transformedRect.right - transformedRect.left;
9851
+ transformedRect.height = transformedRect.bottom - transformedRect.top;
9852
+ return transformedRect;
9853
+ }
9772
9854
 
9773
9855
  function getPendoCore() {
9774
9856
  var pendoCoreValue = ConfigReader.get('pendoCore');
@@ -9846,7 +9928,7 @@ function writeErrorPOST(msg) {
9846
9928
  */
9847
9929
  function writeMetricsPOST(payload) {
9848
9930
  try {
9849
- const url = `${HOST}/data/agentmetrics/${pendo$1.apiKey}`;
9931
+ const url = buildBaseDataUrl('metrics', pendo$1.apiKey, { v: VERSION });
9850
9932
  log.debug(`Sending ${JSON.stringify(payload)} to ${url} using ${fetchKeepalive.supported() ? 'fetch' : 'xhr'}`);
9851
9933
  if (fetchKeepalive.supported()) {
9852
9934
  fetch(url, {
@@ -9912,14 +9994,14 @@ var locked = false;
9912
9994
  * @category Events
9913
9995
  * @example
9914
9996
  * $ pendo.stopSendingEvents()
9915
- * > Pendo Agent locked. No more events will be written.
9997
+ * > Pendo Web SDK locked. No more events will be written.
9916
9998
  */
9917
9999
  var lockEvents = function () {
9918
10000
  var fireEvent = isUnlocked();
9919
10001
  locked = true;
9920
10002
  if (fireEvent)
9921
10003
  Events['transmit:locked'].trigger();
9922
- return 'Pendo Agent locked. No more events will be written.';
10004
+ return 'Pendo Web SDK locked. No more events will be written.';
9923
10005
  };
9924
10006
  /**
9925
10007
  * Starts event collection and transmission.
@@ -9929,14 +10011,14 @@ var lockEvents = function () {
9929
10011
  * @category Events
9930
10012
  * @example
9931
10013
  * $ pendo.startSendingEvents()
9932
- * > Pendo Agent unlocked. Events will be written.
10014
+ * > Pendo Web SDK unlocked. Events will be written.
9933
10015
  */
9934
10016
  var unlockEvents = function () {
9935
10017
  var fireEvent = !isUnlocked();
9936
10018
  locked = false;
9937
10019
  if (fireEvent)
9938
10020
  Events['transmit:unlocked'].trigger();
9939
- return 'Pendo Agent unlocked. Events will be written.';
10021
+ return 'Pendo Web SDK unlocked. Events will be written.';
9940
10022
  };
9941
10023
  /**
9942
10024
  * Returns true if event collection is currently enabled.
@@ -10796,7 +10878,7 @@ function scrollIntoView(element) {
10796
10878
  * @class DomQuery
10797
10879
  * @type {Element[]}
10798
10880
  * @classdesc
10799
- * Sort of like a diet, caffeine-free jQuery. Wrapper for Sizzle library with additional methods for the Pendo Agent.
10881
+ * Sort of like a diet, caffeine-free jQuery. Wrapper for Sizzle library with additional methods for the Pendo Web SDK.
10800
10882
  * Use pendo.Sizzle for customer-defined selectors. Augmented Element[] used to query and alter DOM nodes.
10801
10883
  *
10802
10884
  * @access public
@@ -12399,8 +12481,11 @@ class PerformanceMonitor {
12399
12481
  this._markPerformance(INITIALIZE);
12400
12482
  this._setDebugging();
12401
12483
  Events.debuggerLaunched.on(this._setDebuggingBound);
12484
+ const shouldSend = Math.random() * 100 < ConfigReader.get('performanceMetricsSampleRate');
12485
+ this._setSending(shouldSend);
12486
+ // interval always runs to periodically free memory used by performance api
12402
12487
  this.interval = setInterval(() => {
12403
- this.send();
12488
+ this.send(); // includes call to _clearMarksAndMeasures()
12404
12489
  }, PERFORMANCE_SEND_INTERVAL);
12405
12490
  return () => {
12406
12491
  this.teardown();
@@ -12437,12 +12522,14 @@ class PerformanceMonitor {
12437
12522
  return acc;
12438
12523
  const entries = performance.getEntriesByName(name);
12439
12524
  const value = instrument(entries);
12440
- acc.push({
12441
- name,
12442
- type,
12443
- value,
12444
- timestamp: Date.now()
12445
- });
12525
+ if (value > 0) {
12526
+ acc.push({
12527
+ name,
12528
+ type,
12529
+ value,
12530
+ timestamp: Date.now()
12531
+ });
12532
+ }
12446
12533
  return acc;
12447
12534
  }, []);
12448
12535
  this._clearMarksAndMeasures();
@@ -12783,11 +12870,11 @@ function addSiloParams(options) {
12783
12870
  };
12784
12871
  }
12785
12872
  function addAccountIdParamIfAdoptPartner(silo, next) {
12786
- var isAdoptPartner = treatAsAdoptPartner();
12787
- var firstEvent = _.first(silo);
12788
- var accountId = _.get(firstEvent, 'account_id');
12789
- if (isAdoptPartner && accountId) {
12790
- silo.params = _.extend({}, silo.params, { acc: base64EncodeString(accountId) });
12873
+ if (treatAsAdoptPartner()) {
12874
+ var firstEvent = _.first(silo);
12875
+ var accountId = _.get(firstEvent, 'account_id');
12876
+ var oemAccountId = _.get(firstEvent, 'oem_account_id');
12877
+ addAccountIdParams(silo.params || (silo.params = {}), accountId, oemAccountId);
12791
12878
  }
12792
12879
  next(silo);
12793
12880
  }
@@ -13617,7 +13704,7 @@ var DEBOUNCE_INTERVAL_CHANGE = 5000;
13617
13704
  var handle_change_event = _.debounce(handle_event, DEBOUNCE_INTERVAL_CHANGE, true);
13618
13705
  /*
13619
13706
  * Wires up the page for all the different event driven
13620
- * functions that the pendo agent cares about.
13707
+ * functions that the web SDK cares about.
13621
13708
  *
13622
13709
  * input: eventlist (Array<string>) names of events
13623
13710
  */
@@ -13852,7 +13939,7 @@ function interceptPreventDefault(EventConstructor, eventList) {
13852
13939
  };
13853
13940
  }
13854
13941
  /**
13855
- * Pendo agent’s version of attaching event listeners.
13942
+ * Pendo Web SDK's version of attaching event listeners.
13856
13943
  *
13857
13944
  * @access public
13858
13945
  * @category Events
@@ -13877,7 +13964,7 @@ function attachEvent(element, evt, fn, useCapture) {
13877
13964
  });
13878
13965
  }
13879
13966
  /**
13880
- * Pendo agent’s version of detaching event listeners. Callback must be a named function, cannot remove
13967
+ * Pendo Web SDK's version of detaching event listeners. Callback must be a named function, cannot remove
13881
13968
  * anonymous functions.
13882
13969
  *
13883
13970
  * @access public
@@ -18691,7 +18778,7 @@ var updateVisitorOptions = function (options = {}) {
18691
18778
  };
18692
18779
  };
18693
18780
  /**
18694
- * Updates metadata object for the Pendo agent. Can include visitor and/or account updates, along
18781
+ * Updates metadata object for the Pendo Web SDK. Can include visitor and/or account updates, along
18695
18782
  * with customer-defined metadata values. Changes to identity information will potentially fire
18696
18783
  * identity and metadata events, in turn evaluating guide eligibility for the new user and displaying
18697
18784
  * any matching guides automatically.
@@ -18699,7 +18786,7 @@ var updateVisitorOptions = function (options = {}) {
18699
18786
  * @access public
18700
18787
  * @function
18701
18788
  * @category Identity
18702
- * @param {object} options new metadata to set in the agent
18789
+ * @param {object} options new metadata to set in the web SDK
18703
18790
  * @example
18704
18791
  * pendo.updateOptions( { visitor: { "role":"admin" } , account: { "industry":"retail" } });
18705
18792
  */
@@ -18760,11 +18847,11 @@ var isMetadataBlocked = function () {
18760
18847
  };
18761
18848
  function getMetadata() { return store.getters['metadata/metadata'](); }
18762
18849
  /**
18763
- * Returns all metadata being passed through the agent.
18850
+ * Returns all metadata being passed through the web SDK.
18764
18851
  *
18765
18852
  * @access public
18766
18853
  * @category Identity
18767
- * @returns {JSON} metadata available to the agent
18854
+ * @returns {JSON} metadata available to the web SDK
18768
18855
  * @example
18769
18856
  * pendo.getSerializedMetadata()
18770
18857
  */
@@ -22438,6 +22525,17 @@ function createPreviewBar() {
22438
22525
  }
22439
22526
  var script = document.createElement('script');
22440
22527
  script.src = getPreviewModeAssetUrl();
22528
+ script.onload = function () {
22529
+ var whiteLabelSettings = ConfigReader.get('whiteLabelSettings');
22530
+ if (whiteLabelSettings && frame.contentWindow) {
22531
+ frame.contentWindow.postMessage({
22532
+ mutation: 'preview/setWhiteLabelSettings',
22533
+ payload: {
22534
+ whiteLabelSettings
22535
+ }
22536
+ }, location.origin);
22537
+ }
22538
+ };
22441
22539
  frame.contentDocument.body.appendChild(script);
22442
22540
  frame.contentWindow.ignoreIframeMonitor = true;
22443
22541
  };
@@ -22621,6 +22719,15 @@ function updatePreview(document, activeGuides, lastGuideStepSeen) {
22621
22719
  hostname: SERVER
22622
22720
  }
22623
22721
  }, location.origin);
22722
+ var whiteLabelSettings = ConfigReader.get('whiteLabelSettings');
22723
+ if (whiteLabelSettings) {
22724
+ previewFrame.contentWindow.postMessage({
22725
+ mutation: 'preview/setWhiteLabelSettings',
22726
+ payload: {
22727
+ whiteLabelSettings
22728
+ }
22729
+ }, location.origin);
22730
+ }
22624
22731
  previewFrame.contentWindow.postMessage({
22625
22732
  mutation: 'preview/setGuidePages',
22626
22733
  payload: {
@@ -22971,43 +23078,44 @@ function insertOriginContentHash(originalHash, url, extensionStr, sha256Hash) {
22971
23078
  }
22972
23079
 
22973
23080
  /**
22974
- * API key that is associated with the current Pendo installation as a string.
23081
+ * Formerly `apiKey`. Public app ID that is associated with the current Pendo installation as a string.
22975
23082
  *
22976
23083
  * @access public
22977
- * @name apiKey
23084
+ * @name publicAppId
22978
23085
  * @type {string}
22979
- * @category Agent
23086
+ * @category Core
22980
23087
  * @example
22981
- * pendo.apiKey => 'API_KEY'
23088
+ * pendo.publicAppId => 'PUBLIC_APP_ID'
22982
23089
  */
22983
23090
  /**
22984
- * Array of additional API keys that are set in the config. If no primary API key is set,
22985
- * the first in this array will be assigned to `pendo.apiKey`.
23091
+ * Formerly `additionalApiKeys`. Array of additional app IDs that are set in the config. If no primary app ID is set,
23092
+ * the first in this array will be assigned to `pendo.publicAppId`.
22986
23093
  *
22987
23094
  * @access public
22988
- * @name additionalApiKeys
23095
+ * @name additionalPublicAppIds
22989
23096
  * @type {string[]}
22990
- * @category Agent
23097
+ * @category Core
22991
23098
  * @example
22992
- * pendo.additionalApiKeys => ['FIRST_API_KEY', 'SECOND_API_KEY']
23099
+ * pendo.additionalPublicAppIds => ['FIRST_PUBLIC_APP_ID', 'SECOND_PUBLIC_APP_ID']
22993
23100
  */
22994
23101
  const Keys = (function () {
22995
23102
  let _apiKey = null;
22996
23103
  let _additionalApiKeys = [];
22997
23104
  const setApiKey = (key) => {
22998
23105
  key += '';
22999
- pendo$1.apiKey = key;
23106
+ pendo$1.apiKey = pendo$1.publicAppId = key;
23000
23107
  _apiKey = key;
23001
23108
  };
23002
23109
  const discoverApiKey = (apiKey) => {
23003
- apiKey = ConfigReader.get('apiKey', apiKey);
23110
+ apiKey = ConfigReader.get('publicAppId') || ConfigReader.get('apiKey', apiKey);
23004
23111
  if (apiKey) {
23005
23112
  setApiKey(apiKey);
23006
23113
  }
23007
23114
  return _apiKey;
23008
23115
  };
23009
23116
  const discoverAdditionalApiKeys = (additionalApiKeys) => {
23010
- additionalApiKeys = ConfigReader.get('additionalApiKeys', additionalApiKeys);
23117
+ additionalApiKeys = ConfigReader.get('additionalPublicAppIds') ||
23118
+ ConfigReader.get('additionalApiKeys', additionalApiKeys);
23011
23119
  _additionalApiKeys = _.reduce(additionalApiKeys, (arr, key) => {
23012
23120
  if (key) {
23013
23121
  arr.push(key + '');
@@ -23015,7 +23123,7 @@ const Keys = (function () {
23015
23123
  return arr;
23016
23124
  }, []);
23017
23125
  _additionalApiKeys = [].concat(additionalApiKeys);
23018
- pendo$1.additionalApiKeys = _additionalApiKeys;
23126
+ pendo$1.additionalApiKeys = pendo$1.additionalPublicAppIds = _additionalApiKeys;
23019
23127
  return _additionalApiKeys;
23020
23128
  };
23021
23129
  return {
@@ -25808,7 +25916,6 @@ function isGuideRequestPending() {
25808
25916
  }
25809
25917
  var mostRecentGuideRequest;
25810
25918
  var loadGuideJs = function (apiKey, params) {
25811
- var isAdoptPartner = treatAsAdoptPartner();
25812
25919
  var guideRequestId = _.uniqueId();
25813
25920
  var deferred = q.defer();
25814
25921
  mostRecentGuideRequest = {
@@ -25836,8 +25943,8 @@ var loadGuideJs = function (apiKey, params) {
25836
25943
  v: VERSION,
25837
25944
  ct: (new Date()).getTime()
25838
25945
  };
25839
- if (isAdoptPartner && params.accountId && params.accountId !== 'ACCOUNT-UNIQUE-ID') {
25840
- queryString.acc = base64EncodeString(params.accountId);
25946
+ if (treatAsAdoptPartner()) {
25947
+ addAccountIdParams(queryString, params.accountId, ConfigReader.get('oemAccountId'));
25841
25948
  }
25842
25949
  if (isDebuggingEnabled()) {
25843
25950
  // Include debug info from server
@@ -25985,7 +26092,7 @@ function shouldLoadGuides(visitorId, callback) {
25985
26092
  return true;
25986
26093
  }
25987
26094
  /**
25988
- * Manually load guides for current visitor and URL. This is typically handled automatically by the Agent
26095
+ * Manually load guides for current visitor and URL. This is typically handled automatically by the web SDK
25989
26096
  * whenever the host Application changes its URL. In rare circumstances, a host Application may chose to
25990
26097
  * force the load of Guides programmatically. One reason may be in order to get any guides designed for a visitor
25991
26098
  * immediately after using a specific part of the Application that doesn't cause a URL change.
@@ -27375,7 +27482,7 @@ var EventRouter = function () {
27375
27482
  step.response(_.compact(responses));
27376
27483
  }
27377
27484
  else {
27378
- log.info('[Agent] Error! Trying to submit a poll response but step does not have response function!');
27485
+ log.info('[Pendo Web SDK] Error! Trying to submit a poll response but step does not have response function!');
27379
27486
  }
27380
27487
  if (actionType !== actionKeys.submitPollAndGoToStep) {
27381
27488
  step.advance();
@@ -27900,7 +28007,8 @@ var initialized$1 = false;
27900
28007
  const PluginAPI = {
27901
28008
  agent: {
27902
28009
  getJwtInfoCopy: JWT.get,
27903
- treatAsAdoptPartner
28010
+ treatAsAdoptPartner,
28011
+ addAccountIdParams
27904
28012
  },
27905
28013
  agentStorage,
27906
28014
  analytics: {
@@ -28233,14 +28341,14 @@ var ResourceCenterActivity = (function () {
28233
28341
  })();
28234
28342
 
28235
28343
  /**
28236
- * Returns boolean representing whether the Agent is fully loaded and has an API key.
28344
+ * Returns boolean representing whether the Pendo Web SDK is fully loaded and has an API key.
28237
28345
  *
28238
28346
  * @access public
28239
- * @category Agent
28347
+ * @category Core
28240
28348
  * @returns {boolean}
28241
28349
  * @example
28242
28350
  * if (pendo.isReady()) {
28243
- * // runs if agent has fully loaded
28351
+ * // runs if web SDK has fully loaded
28244
28352
  * }
28245
28353
  */
28246
28354
  const isReady = (pendoObj) => {
@@ -28434,14 +28542,14 @@ function registerEventHandlers({ events = [] }) {
28434
28542
  let initializeCounter = 0;
28435
28543
  const initializeImmediately = 'initializeImmediately';
28436
28544
  /**
28437
- * Initializes the Pendo agent in a browser window. This function only needs to be called once per page load. Any subsequent calls, without first having called `teardown`, will be ignored.
28438
- * Once the agent has been initialized, any updates to identity or metadata should be done using `identify` or `updateOptions`.
28545
+ * Initializes the Pendo Web SDK in a browser window. This function only needs to be called once per page load. Any subsequent calls, without first having called `teardown`, will be ignored.
28546
+ * Once the web SDK has been initialized, any updates to identity or metadata should be done using `identify` or `updateOptions`.
28439
28547
  *
28440
28548
  * @access public
28441
28549
  * @function
28442
- * @category Agent
28550
+ * @category Core
28443
28551
  * @name initialize
28444
- * @param {object} options identity metadata and configuration to initialize agent
28552
+ * @param {object} options identity metadata and configuration to initialize web SDK
28445
28553
  * @see {@link https://support.pendo.io/hc/en-us/articles/360046272771-Developer-s-guide-to-installing-Pendo#what-installation-involves-0-2 | Pendo Installation}
28446
28554
  * @example
28447
28555
  * pendo.initialize({
@@ -28477,7 +28585,7 @@ const initialize = makeSafe(function (options) {
28477
28585
  log.info([
28478
28586
  'pendo.initialize only needs to be called once',
28479
28587
  isSfdcLightning() ? ' per namespace' : '',
28480
- '. Use pendo.updateOptions to update metadata after the agent has initialized.'
28588
+ '. Use pendo.updateOptions to update metadata after the web SDK has initialized.'
28481
28589
  ].join(''));
28482
28590
  }
28483
28591
  return;
@@ -28699,12 +28807,12 @@ function startup(callQueue, autoInitialize, whenLoadedCall) {
28699
28807
  }
28700
28808
  }
28701
28809
  /**
28702
- * Shuts down the agent and cleans up all timers and listeners. Upon completion
28703
- * the agent will be able to be re-initialized when needed or cleaned up from
28810
+ * Shuts down the web SDK and cleans up all timers and listeners. Upon completion
28811
+ * the web SDK will be able to be re-initialized when needed or cleaned up from
28704
28812
  * the window. This will halt all guides and data collection.
28705
28813
  *
28706
28814
  * @access public
28707
- * @category Agent
28815
+ * @category Core
28708
28816
  * @returns {void}
28709
28817
  * @example
28710
28818
  * window.pendo.teardown();
@@ -29435,7 +29543,7 @@ var getDefaultActiveContexts = function () {
29435
29543
  return ac.split(',');
29436
29544
  };
29437
29545
  /**
29438
- * Enable [Agent] console logging for debugging purposes.
29546
+ * Enable console logging for debugging purposes.
29439
29547
  *
29440
29548
  * @access public
29441
29549
  * @category Debugging
@@ -29454,7 +29562,7 @@ var enableLogging = function () {
29454
29562
  return 'logging enabled';
29455
29563
  };
29456
29564
  /**
29457
- * Disable [Agent] console logging for debugging purposes.
29565
+ * Disable console logging for debugging purposes.
29458
29566
  *
29459
29567
  * @access public
29460
29568
  * @category Debugging
@@ -29475,7 +29583,7 @@ function initLogging() {
29475
29583
  log.addEventListener('log', writeLog);
29476
29584
  /**
29477
29585
  * Stores console logging status, set with `pendo.enableLogging()` or `pendo.disableLogging()`.
29478
- * Logs will appear with `[Agent]` prefixed in the browser console.
29586
+ * Logs will appear with `[Pendo Web SDK]` prefixed in the browser console.
29479
29587
  *
29480
29588
  * @name _pendo_log-enabled
29481
29589
  * @category Cookies/localStorage
@@ -29513,13 +29621,13 @@ var shouldWeLog = function (contexts) {
29513
29621
  return (!!logOverride || !!isDebuggingEnabled());
29514
29622
  };
29515
29623
  /**
29516
- * Logs an output to the console as the [Agent].
29624
+ * Logs an output to the console as the [Pendo Web SDK].
29517
29625
  *
29518
29626
  * @access public
29519
29627
  * @category Debugging
29520
29628
  * @example
29521
29629
  * pendo.log('hello world!')
29522
- * // [Agent] hello world!
29630
+ * // [Pendo Web SDK] hello world!
29523
29631
  */
29524
29632
  var logPublic = function (msg, ...contexts) {
29525
29633
  log.info(msg, { contexts });
@@ -29576,7 +29684,7 @@ var setActiveContexts = function (contexts) {
29576
29684
  var doConsoleLog = function (msg, prefix) {
29577
29685
  if (!canWeLog())
29578
29686
  return;
29579
- prefix = prefix || '[Agent] ';
29687
+ prefix = prefix || '[Pendo Web SDK] ';
29580
29688
  if (msg && msg.length) {
29581
29689
  var msgStart = msg.length > 1000 ? msg.length - 1000 : 0;
29582
29690
  if (msgStart) {
@@ -29756,8 +29864,8 @@ var validateInstall = function validateInstall(skipLogging) {
29756
29864
  }
29757
29865
  if (!skipLogging)
29758
29866
  console.group('Pendo Install Validation');
29759
- if (!pendo$1.apiKey) {
29760
- handleLogging('error', 'No Pendo API key configured. Make sure to call pendo.initialize() with a valid Pendo API key.', 'apiKey');
29867
+ if (!pendo$1.apiKey && !pendo$1.publicAppId) {
29868
+ handleLogging('error', 'No Pendo public app ID configured. Make sure to call pendo.initialize() with a valid Pendo public app ID.', 'publicAppId');
29761
29869
  }
29762
29870
  var visitorId = get_visitor_id();
29763
29871
  if (isAnonymousVisitor(visitorId)) {
@@ -32730,7 +32838,7 @@ var FramesModule = (function () {
32730
32838
  agentStorage.registry.addSession(TAB_ID);
32731
32839
  /**
32732
32840
  * When a browser window is cloned the `pendo_tabId` is copied to the new window.
32733
- * The Pendo agent detects this, creates a new `pendo_tabId`, and stores the old
32841
+ * The Pendo Web SDK detects this, creates a new `pendo_tabId`, and stores the old
32734
32842
  * `pendo_tabId` in `pendo_parentTabId`.
32735
32843
  *
32736
32844
  * @name pendo_parentTabId
@@ -36191,7 +36299,7 @@ function LauncherBadge(config) {
36191
36299
  element.src = replaceWithContentHost(config.launcherBadgeUrl);
36192
36300
  }
36193
36301
  element.onerror = function (e) {
36194
- log.info('[Agent] Error! Unable to load guide center image ' + config.launcherBadgeUrl);
36302
+ log.info('[Pendo Web SDK] Error! Unable to load guide center image ' + config.launcherBadgeUrl);
36195
36303
  log.critical('ERROR in when attempting to render guide center badge image', { imgSrc: config.launcherBadgeUrl });
36196
36304
  };
36197
36305
  if (isBrowserInQuirksmode()) {
@@ -37691,6 +37799,43 @@ const EventProperties = (function () {
37691
37799
  }
37692
37800
  })();
37693
37801
 
37802
+ /**
37803
+ * OEM Account ID Plugin
37804
+ *
37805
+ * This plugin reads the oemAccountId from configuration and sets it onto every
37806
+ * captured event if the oemAccountId is defined.
37807
+ */
37808
+ const OemAccountId = (function () {
37809
+ let pluginAPI;
37810
+ let oemAccountId;
37811
+ let eventCapturedHandler;
37812
+ return {
37813
+ name: 'OemAccountId',
37814
+ initialize,
37815
+ teardown
37816
+ };
37817
+ function initialize(_, PluginAPI) {
37818
+ pluginAPI = PluginAPI;
37819
+ oemAccountId = pluginAPI.ConfigReader.get('oemAccountId');
37820
+ if (oemAccountId) {
37821
+ eventCapturedHandler = function (event) {
37822
+ setOemAccountId(event);
37823
+ };
37824
+ pluginAPI.Events.on('eventCaptured', eventCapturedHandler);
37825
+ }
37826
+ }
37827
+ function teardown() {
37828
+ if (eventCapturedHandler) {
37829
+ pluginAPI.Events.off('eventCaptured', eventCapturedHandler);
37830
+ }
37831
+ }
37832
+ function setOemAccountId(event) {
37833
+ if (oemAccountId && event && event.data && event.data[0]) {
37834
+ event.data[0].oem_account_id = oemAccountId;
37835
+ }
37836
+ }
37837
+ })();
37838
+
37694
37839
  var debugging;
37695
37840
  function debuggerExports() {
37696
37841
  return {
@@ -38726,8 +38871,8 @@ class SegmentFlags {
38726
38871
  v: this.pendo.VERSION,
38727
38872
  ct: (new Date()).getTime()
38728
38873
  };
38729
- if (this.api.agent.treatAsAdoptPartner() && params.accountId && params.accountId !== 'ACCOUNT-UNIQUE-ID') {
38730
- queryString.acc = this.api.util.base64EncodeString(params.accountId);
38874
+ if (this.api.agent.treatAsAdoptPartner()) {
38875
+ this.api.agent.addAccountIdParams(queryString, params.accountId, this.api.ConfigReader.get('oemAccountId'));
38731
38876
  }
38732
38877
  const endpoint = this.pendo.LOADER === 'script' ? 'segmentflag.js' : 'segmentflag.json';
38733
38878
  let url = this.api.transmit.buildBaseDataUrl(endpoint, this.pendo.apiKey, queryString);
@@ -40103,6 +40248,7 @@ function registerBuiltInPlugins() {
40103
40248
  registerPlugin(Branding);
40104
40249
  registerPlugin(ActionAutomation);
40105
40250
  registerPlugin(EventProperties);
40251
+ registerPlugin(OemAccountId);
40106
40252
  registerPlugin(StepTimeoutMonitor);
40107
40253
  registerPlugin(DebuggerLauncher);
40108
40254
  registerPlugin(FrustrationEvent);
@@ -47759,6 +47905,7 @@ function record(options = {}) {
47759
47905
  recordDOM = true,
47760
47906
  recordCanvas = false,
47761
47907
  recordCrossOriginIframes = false,
47908
+ emitFromIframe = false,
47762
47909
  recordAfter = options.recordAfter === "DOMContentLoaded" ? options.recordAfter : "load",
47763
47910
  userTriggeredOnInput = false,
47764
47911
  collectFonts = false,
@@ -47769,7 +47916,7 @@ function record(options = {}) {
47769
47916
  errorHandler: errorHandler2
47770
47917
  } = options;
47771
47918
  registerErrorHandler(errorHandler2);
47772
- const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true;
47919
+ const inEmittingFrame = emitFromIframe ? true : recordCrossOriginIframes ? window.parent === window : true;
47773
47920
  let passEmitsToParent = false;
47774
47921
  if (!inEmittingFrame) {
47775
47922
  try {
@@ -53428,6 +53575,7 @@ const RECORDING_CONFIG_WORKERURL = 'recording.workerUrl';
53428
53575
  const RECORDING_CONFIG_ON_RECORDING_START = 'recording.onRecordingStart';
53429
53576
  const RECORDING_CONFIG_ON_RECORDING_STOP = 'recording.onRecordingStop';
53430
53577
  const RECORDING_CONFIG_WORKER_OVERRIDE = 'recording.workerOverride';
53578
+ const RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT = 'recording.treatIframeAsRoot';
53431
53579
  const RESOURCE_CACHING = 'resourceCaching';
53432
53580
  const ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000;
53433
53581
  const THIRTY_MINUTES = 1000 * 60 * 30;
@@ -53522,6 +53670,22 @@ class SessionRecorder {
53522
53670
  * @type {object}
53523
53671
  */
53524
53672
  cf.addOption(RECORDING_CONFIG_WORKER_OVERRIDE, [cf.sources.PENDO_CONFIG_SRC], undefined);
53673
+ /**
53674
+ * Option to treat this iframe as the root recording frame.
53675
+ *
53676
+ * When set to true, this iframe will emit its own recording events and create its own
53677
+ * recording session, acting as a root recording frame.
53678
+ *
53679
+ * When set to false or undefined (default), recording events from this iframe will be passed up
53680
+ * to the parent frame for handling.
53681
+ *
53682
+ * @access public
53683
+ * @category Config/Replay
53684
+ * @name recording.treatIframeAsRoot
53685
+ * @default undefined
53686
+ * @type {boolean}
53687
+ */
53688
+ cf.addOption(RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT, [cf.sources.SNIPPET_SRC], undefined);
53525
53689
  cf.addOption(RESOURCE_CACHING, [cf.sources.PENDO_CONFIG_SRC], undefined);
53526
53690
  }
53527
53691
  initialize(pendo, PluginAPI) {
@@ -53744,7 +53908,8 @@ class SessionRecorder {
53744
53908
  // we need to concat hidden selectors to re-use block selector logic
53745
53909
  blockSelector: blockedSelectors.concat(hiddenSelectors).join(','),
53746
53910
  hideSelector: hiddenSelectors.join(','),
53747
- recordCrossOriginIframes: recordingOptions.recordCrossOriginIframes != null ? recordingOptions.recordCrossOriginIframes : true
53911
+ recordCrossOriginIframes: recordingOptions.recordCrossOriginIframes != null ? recordingOptions.recordCrossOriginIframes : true,
53912
+ emitFromIframe: !!this.api.ConfigReader.get(RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT)
53748
53913
  };
53749
53914
  return config;
53750
53915
  }
@@ -56039,19 +56204,21 @@ var ConfigReader = (function () {
56039
56204
  function initializeOptions() {
56040
56205
  // Core
56041
56206
  /**
56042
- * When included, all analytics events will be sent to each of the api keys in the list (guide events are
56043
- * only sent to the primary api key). This will only function if there are no `additionalApiKeys` set on
56207
+ * Formerly `additionalApiKeys`. When included, all analytics events will be sent to each of the public app IDs in the list (guide events are
56208
+ * only sent to the primary public app ID). This will only function if there are no `additionalPublicAppIds` set on
56044
56209
  * the configuration included in the downloaded Agent.
56045
56210
  *
56046
56211
  * @access public
56047
56212
  * @category Config/Core
56048
- * @name additionalApiKeys
56213
+ * @name additionalPublicAppIds
56049
56214
  * @default []
56050
56215
  * @type {string[]}
56051
56216
  */
56217
+ addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56052
56218
  addOption('additionalApiKeys', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56053
56219
  addOption('allowedOriginServers');
56054
56220
  addOption('allowedOriginServerHashes');
56221
+ addOption('allowMixedApplicationFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
56055
56222
  addOption('allowMixedApiKeyFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
56056
56223
  /**
56057
56224
  * A function that returns either an array of strings or an object to decorate the url for events.
@@ -56065,15 +56232,16 @@ var ConfigReader = (function () {
56065
56232
  */
56066
56233
  addOption('annotateUrl', [SNIPPET_SRC]);
56067
56234
  /**
56068
- * A primary api key to send data to from the Agent. This will only function if there is no `apiKey` set
56235
+ * Formerly `apiKey`. A primary public app ID to send data to from the Agent. This will only function if there is no `publicAppId` set
56069
56236
  * on the configuration included in the downloaded Agent.
56070
56237
  *
56071
56238
  * @access public
56072
56239
  * @category Config/Core
56073
- * @name apiKey
56240
+ * @name publicAppId
56074
56241
  * @default undefined
56075
56242
  * @type {string}
56076
56243
  */
56244
+ addOption('publicAppId', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56077
56245
  addOption('apiKey', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56078
56246
  addOption('assetHost', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
56079
56247
  /**
@@ -56711,18 +56879,19 @@ var ConfigReader = (function () {
56711
56879
  */
56712
56880
  addOption('inlineStyleNonce', [SNIPPET_SRC]);
56713
56881
  /**
56714
- * Specify a preferred apiKey to lead the multi-apiKey iframe installations to make decisions about automatic
56715
- * guide display. In installations with more than 2 apiKeys, the leaderKey can be specified as a priority
56716
- * list (e.g. `leaderKey: ['key1', 'key2', ...]`). Either all frames must agree on the leaderKey setting,
56717
- * or only one frame should specify the leaderKey. If neither of these conditions are met, the default leader
56882
+ * Formerly `leaderKey` Specify a preferred publicAppId to lead the multi-application iframe installation to make decisions about automatic
56883
+ * guide display. In installations with more than 2 publicAppIds, the leaderApplication can be specified as a priority
56884
+ * list (e.g. `leaderApplication: ['key1', 'key2', ...]`). Either all frames must agree on the leaderApplication setting,
56885
+ * or only one frame should specify the leaderApplication. If neither of these conditions are met, the default leader
56718
56886
  * determination logic (top frame or earliest to join) will be used.
56719
56887
  *
56720
56888
  * @access public
56721
56889
  * @category Config/Guides
56722
- * @name leaderKey
56890
+ * @name leaderApplication
56723
56891
  * @default []
56724
56892
  * @type {string[]}
56725
56893
  */
56894
+ addOption('leaderApplication', [SNIPPET_SRC, PENDO_CONFIG_SRC], []);
56726
56895
  addOption('leaderKey', [SNIPPET_SRC, PENDO_CONFIG_SRC], []);
56727
56896
  /**
56728
56897
  * If `true`, custom code blocks in building block guides will not be allowed to run. Also, classic guides
@@ -56783,6 +56952,8 @@ var ConfigReader = (function () {
56783
56952
  addOption('designerAgentPluginsLoader', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56784
56953
  addOption('guideContentLoader', [PENDO_CONFIG_SRC]);
56785
56954
  addOption('trainingPartner');
56955
+ addOption('oemAccountId', [SNIPPET_SRC]);
56956
+ addOption('whiteLabelSettings', [PENDO_CONFIG_SRC]);
56786
56957
  // Frustration
56787
56958
  addOption('errorClickLogging', [PENDO_CONFIG_SRC], false);
56788
56959
  // Embedded Guides
@@ -56791,6 +56962,7 @@ var ConfigReader = (function () {
56791
56962
  addOption('formValidation', [PENDO_CONFIG_SRC], false);
56792
56963
  // Performance Metrics
56793
56964
  addOption('performanceMetricsEnabled', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
56965
+ addOption('performanceMetricsSampleRate', [SNIPPET_SRC, PENDO_CONFIG_SRC], 0);
56794
56966
  }
56795
56967
  initializeOptions();
56796
56968
  var sourceGetters = {};
@@ -57586,10 +57758,8 @@ class DevlogTransport {
57586
57758
  }
57587
57759
  buildGetUrl(baseUrl, jzb) {
57588
57760
  const params = {};
57589
- const isAdoptPartner = this.pluginAPI.agent.treatAsAdoptPartner();
57590
- const accountId = this.pendo.get_account_id();
57591
- if (isAdoptPartner && accountId && accountId !== 'ACCOUNT-UNIQUE-ID') {
57592
- params.acc = this.pluginAPI.util.base64EncodeString(accountId);
57761
+ if (this.pluginAPI.agent.treatAsAdoptPartner()) {
57762
+ this.pluginAPI.agent.addAccountIdParams(params, this.pendo.get_account_id(), this.pluginAPI.ConfigReader.get('oemAccountId'));
57593
57763
  }
57594
57764
  const jwtOptions = this.pluginAPI.agent.getJwtInfoCopy();
57595
57765
  if (!this.pendo._.isEmpty(jwtOptions)) {
@@ -57635,10 +57805,8 @@ class DevlogTransport {
57635
57805
  events: jzb,
57636
57806
  browser_time: this.pluginAPI.util.getNow()
57637
57807
  };
57638
- const isAdoptPartner = this.pluginAPI.agent.treatAsAdoptPartner();
57639
- const accountId = this.pendo.get_account_id();
57640
- if (isAdoptPartner && accountId && accountId !== 'ACCOUNT-UNIQUE-ID') {
57641
- bodyPayload.acc = this.pluginAPI.util.base64EncodeString(accountId);
57808
+ if (this.pluginAPI.agent.treatAsAdoptPartner()) {
57809
+ this.pluginAPI.agent.addAccountIdParams(bodyPayload, this.pendo.get_account_id(), this.pluginAPI.ConfigReader.get('oemAccountId'));
57642
57810
  }
57643
57811
  const body = JSON.stringify(this.pendo._.extend(bodyPayload, jwtOptions));
57644
57812
  return this.post(url, {