Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/components/message/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
merchantConfigHash: window.xprops.merchantConfigHash ?? null,
disableSetCookie: window.xprops.disableSetCookie ?? null,
features: window.xprops.features ?? null,
contextualComponents: window.xprops.contextualComponents ?? null
contextualComponents: window.xprops.contextualComponents ?? null,
pageType: window.xprops.pageType ?? null
});

const [serverData, setServerData] = createState({
Expand Down Expand Up @@ -129,7 +130,8 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
contextualComponents,
treatmentsHash,
disableSetCookie,
features
features,
pageType
} = xprops;

setProps({
Expand All @@ -146,7 +148,8 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
channel,
contextualComponents,
disableSetCookie,
features
features,
pageType
});

// Generate new MRID on message update.
Expand All @@ -172,7 +175,8 @@ const Message = function ({ markup, meta, parentStyles, warnings }) {
deviceID: getOrCreateDeviceID(),
treatments: treatmentsHash,
disableSetCookie,
features
features,
pageType
})
.filter(([, val]) => Boolean(val))
.reduce(
Expand Down
5 changes: 4 additions & 1 deletion src/library/zoid/message/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,13 @@ export default createGlobalVariableGetter('__paypal_credit_message__', () =>
value: ({ props }) => {
const { onReady } = props;
return ({ meta, activeTags, ts, requestDuration, messageRequestId }) => {
const { account, merchantId, index, modal, getContainer } = props;
const { account, merchantId, index, modal, getContainer, pageType } = props;
const { trackingDetails, offerType, ppDebugId } = meta;
const partnerClientId = merchantId && account.slice(10); // slice is to remove the characters 'client-id:' from account name

// overwrites potentially poisoned PAGE_TYPE value from cached trackingDetails
trackingDetails.PAGE_TYPE = pageType;

ppDebug(`Message Correlation ID: ${ppDebugId}`);

// Write deviceID and ts cookie from iframe localStorage to merchant domain localStorage
Expand Down
Loading