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
7 changes: 6 additions & 1 deletion src/app/hooks/useClickTrackerHandler/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,14 @@ export default (eventTrackingData = {}) => {
eventType: CLICK_EVENT,
});

// HOT FIX FOR COMPONENT TRACKS SHOWING UP AS PAGE TRACKS:
const formattedReverbStaticUrl = reverbStaticUrl
.replace('&x6=[{referrer}]', '')
.replace('&ref={referrer}', '');

return {
...(enableStaticTracking && {
[STATIC_REVERB_CLICK_TRACKING]: reverbStaticUrl,
[STATIC_REVERB_CLICK_TRACKING]: formattedReverbStaticUrl,
}),
...(isHydrated && { onClick: clickTracker }),
};
Expand Down
7 changes: 6 additions & 1 deletion src/app/hooks/useViewTracker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,14 @@ export default (eventTrackingData?: EventTrackingData): any => {
eventType: VIEW_EVENT,
});

// HOT FIX FOR COMPONENT TRACKS SHOWING UP AS PAGE TRACKS:
const formattedReverbStaticUrl = reverbStaticUrl
.replace('&x6=[{referrer}]', '')
.replace('&ref={referrer}', '');

return isLite
? {
[STATIC_REVERB_VIEW_TRACKING]: reverbStaticUrl,
[STATIC_REVERB_VIEW_TRACKING]: formattedReverbStaticUrl,
}
: {
ref: viewTracker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`Lite Site Articles Lite Site Summary should match snapshot 1`] = `
<a
class="css-o9pupk"
data-ignore-lite="true"
data-static-reverb-click="https://logws1363.ati-host.net/hit.xiti?idclient={idclient}&s=596068&r={screenResolutionColourDepth}&re={browserViewportResolution}&hl={timestamp}&ts={epochTimestamp}&lng={language}&x6=[{referrer}]&app_type=lite&ref={referrer}&app_name=news-gahuza&language=rw&content_type=article&events=%5B%7B%22name%22%3A%22viewability.select%22%2C%22data%22%3A%7B%22item%22%3A%7B%22name%22%3A%22lite-site-summary%22%2C%22link%22%3A%22{forwardingLink}%22%7D%2C%22event%22%3A%7B%22category%22%3A%22viewability%22%2C%22action%22%3A%22select%22%7D%2C%22group%22%3A%7B%22type%22%3A%22lite-site-summary%22%7D%2C%22user%22%3A%7B%22id%22%3Anull%7D%2C%22app%22%3A%7B%22type%22%3A%22lite%22%2C%22name%22%3A%22news-gahuza%22%7D%7D%7D%5D&context=%5B%7B%22data%22%3A%7B%22page%22%3A%7B%7D%2C%22site%22%3A%7B%22level2_id%22%3A%22%22%7D%7D%7D%5D"
data-static-reverb-click="https://logws1363.ati-host.net/hit.xiti?idclient={idclient}&s=596068&r={screenResolutionColourDepth}&re={browserViewportResolution}&hl={timestamp}&ts={epochTimestamp}&lng={language}&app_type=lite&app_name=news-gahuza&language=rw&content_type=article&events=%5B%7B%22name%22%3A%22viewability.select%22%2C%22data%22%3A%7B%22item%22%3A%7B%22name%22%3A%22lite-site-summary%22%2C%22link%22%3A%22{forwardingLink}%22%7D%2C%22event%22%3A%7B%22category%22%3A%22viewability%22%2C%22action%22%3A%22select%22%7D%2C%22group%22%3A%7B%22type%22%3A%22lite-site-summary%22%7D%2C%22user%22%3A%7B%22id%22%3Anull%7D%2C%22app%22%3A%7B%22type%22%3A%22lite%22%2C%22name%22%3A%22news-gahuza%22%7D%7D%7D%5D&context=%5B%7B%22data%22%3A%7B%22page%22%3A%7B%7D%2C%22site%22%3A%7B%22level2_id%22%3A%22%22%7D%7D%7D%5D"
href="http://localhost:7081/gahuza/articles/cey23zx8wx8o"
id="go-back-to-canonical-link"
>
Expand Down
Loading