fix: cleanup title before tracking it
This commit is contained in:
@@ -134,13 +134,17 @@ export const accountPageQueryRouter = router({
|
|||||||
content,
|
content,
|
||||||
} as AccountPage
|
} as AccountPage
|
||||||
|
|
||||||
|
const parsedtitle = response.data.account_page.title
|
||||||
|
.replaceAll(" ", "")
|
||||||
|
.toLowerCase()
|
||||||
|
|
||||||
const tracking: TrackingSDKPageData = {
|
const tracking: TrackingSDKPageData = {
|
||||||
pageId: validatedAccountPage.data.account_page.system.uid,
|
pageId: validatedAccountPage.data.account_page.system.uid,
|
||||||
lang: validatedAccountPage.data.account_page.system.locale as Lang,
|
lang: validatedAccountPage.data.account_page.system.locale as Lang,
|
||||||
publishedDate: validatedAccountPage.data.account_page.system.updated_at,
|
publishedDate: validatedAccountPage.data.account_page.system.updated_at,
|
||||||
createdDate: validatedAccountPage.data.account_page.system.created_at,
|
createdDate: validatedAccountPage.data.account_page.system.created_at,
|
||||||
channel: TrackingChannelEnum["scandic-friends"],
|
channel: TrackingChannelEnum["scandic-friends"],
|
||||||
pageType: `member${response.data.account_page.title}page`,
|
pageType: `member${parsedtitle}page`,
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user