The CTR calculation was incorrectly summing up individual CTR values,
resulting in inflated percentages. Now calculates CTR properly by
dividing total clicks by total impressions.
Previous Implementation:
- CTR was calculated by adding up individual CTR percentages
- This resulted in artificially high CTR values
- For example: [10%, 15%, 20%] => 45% (incorrect)
New Implementation:
- CTR is now calculated using (total clicks / total impressions) * 100
- This provides the actual click-through rate across all data
- For example: (50 clicks / 1000 impressions) * 100 = 5% (correct)
This fix ensures accurate CTR reporting in the analytics dashboard.
Changes:
- Removed CTR accumulation from reducer
- Added proper CTR calculation based on total clicks and impressions
- Maintains better statistical accuracy in reporting
- Fixes update time of the keywords table is not aligned correctly in desktop.
- Fixes Content layout shift caused by the Domain Header absence.
- Fixes Footer causingpage scrollbar to appear.
- Replaces useEffet with useMemo & useLayoutEffect where necessary.
- Converts some useEffects to separate hooks.
- Moves the functions defined within components to utils.
- Splits the Keywords renderPosition function to its own component.