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
8 changes: 6 additions & 2 deletions .github/workflows/tracking-params-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ jobs:
run: |
# Extract parameter names from DuckDuckGo JSON
# DDG JSON has param as an array of objects w/ a "parameter" key
# grep -v strips out common prefixes handled by UtmStrip
jq -r '.settings.parameters[]' /tmp/ddg-params.json \
| sort > /tmp/ddg-list.txt
| grep -Ev '^(action|fb|ga|hmb|hsa|mtm|pk|oly|utm)_' \
| sort -u > /tmp/ddg-list.txt

# Extract quoted strings from utmstrip.ts (single-quoted identifiers)
# Matches 'param_name' patterns, strips quotes, excludes TypeScript types
# grep -v strips out common prefixes handled by UtmStrip
grep -oE "'[a-zA-Z_][a-zA-Z0-9_]*'" src/utmstrip.ts \
| tr -d "'" | sort -u > /tmp/utmstrip-list.txt
| tr -d "'" | grep -Ev '^(action|fb|ga|hmb|hsa|mtm|pk|oly|utm)_' \
| sort -u > /tmp/utmstrip-list.txt

# Find params in DDG list not covered in utmstrip.ts
comm -23 /tmp/ddg-list.txt /tmp/utmstrip-list.txt > /tmp/missing.txt
Expand Down
2 changes: 1 addition & 1 deletion src/utmstrip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// Facebook/Instagram
'fbclid', 'hrc', 'igsh', 'igshid', 'refsrc',
// Google Analytics
'_gl', 'gclsrc', 'srsltid',
'_gl', 'gclsrc', 'gs_l', 'srsltid',
// HubSpot
'_hsenc', '_hsmi', '__hsfp', '__hssc', '__hstc',
// IBM (non-numeric only)
Expand Down
Loading