Highlight rows above a threshold
Asks for a threshold value and highlights in green every GA4 row whose first numeric column reaches it.
Code to copy
(function () {
var input = prompt('Highlight rows where the first numeric column is at least:', '1000');
if (input === null) return;
var min = parseFloat(input.replace(/[^\d.]/g, ''));
if (isNaN(min)) return;
document.querySelectorAll('[role="row"], tbody tr').forEach(function (row) {
var cell = row.querySelector('[role="cell"], [role="gridcell"], td');
if (!cell) return;
var n = parseFloat((cell.textContent || '').replace(/[^\d.]/g, ''));
if (!isNaN(n) && n >= min) {
row.style.setProperty('background', 'rgba(52,168,83,0.15)', 'important');
row.style.setProperty('font-weight', '600', 'important');
}
});
})();
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.