Skip to content

Commit

Permalink
chore(@dpc-sdp/ripple-ui-core): update dataLayer value format
Browse files Browse the repository at this point in the history
  • Loading branch information
lambry committed Oct 11, 2024
1 parent 0cd1e3c commit 3cd25fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-analytics/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ export default {
form_id: payload?.contextId,
field_id: payload?.id,
value: payload?.value,
type: 'date',
type: 'date-range',
component: 'rpl-form-date-range',
platform_event: 'update'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,17 @@ const fromMax = computed(() => internalTo.value || props.max)
const toMin = computed(() => internalFrom.value || props.min)
const handleUpdate = (event) => {
const eventValue =
internalFrom.value || internalTo.value
? `${internalFrom.value || null},${internalTo.value || null}`
: ''
emitRplEvent(
'update',
{
...event,
id: props.id,
label: props?.label,
value: sanitisePIIField(props.pii, props?.value)
value: sanitisePIIField(props.pii, eventValue)
},
{ global: true }
)
Expand Down

0 comments on commit 3cd25fc

Please sign in to comment.