diff --git a/src/1_utils.js b/src/1_utils.js index afb80df5..ddd26ea3 100644 --- a/src/1_utils.js +++ b/src/1_utils.js @@ -1337,11 +1337,10 @@ utils.shouldAddDMAParams = function(endPointURL) { utils.setDMAParams = function(data, dmaObj = {}, endPoint) { const v1_DMAEndPoints = [ "/v1/open", "/v1/pageview" ]; const v2_DMAEndPoints = [ "/v2/event/standard", "/v2/event/custom" ]; - const dmaParams = { - dma_eea: dmaObj['eeaRegion'], - dma_ad_personalization: dmaObj['adPersonalizationConsent'], - dma_ad_user_data: dmaObj['adUserDataUsageConsent'] - }; + const dmaParams = {}; + dmaParams['dma_eea'] = dmaObj['eeaRegion']; + dmaParams['dma_ad_personalization'] = dmaObj['adPersonalizationConsent']; + dmaParams['dma_ad_user_data'] = dmaObj['adUserDataUsageConsent']; if (v1_DMAEndPoints.includes(endPoint)) { Object.assign(data, dmaParams); } diff --git a/src/6_branch.js b/src/6_branch.js index e66bc2fc..65222f4c 100644 --- a/src/6_branch.js +++ b/src/6_branch.js @@ -1973,11 +1973,10 @@ Branch.prototype['setDMAParamsForEEA'] = wrap(callback_params.CALLBACK_ERR, func return; } - const dmaObj = { - eeaRegion, - adPersonalizationConsent, - adUserDataUsageConsent - }; + const dmaObj = {}; + dmaObj['eeaRegion'] = eeaRegion; + dmaObj['adPersonalizationConsent'] = adPersonalizationConsent; + dmaObj['adUserDataUsageConsent'] = adUserDataUsageConsent; this._storage.set('branch_dma_data', safejson.stringify(dmaObj), true); } catch (e) {