Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

tracking-param-check

CI Release License: MIT

Find the exact redirect hop that silently drops or changes your advertising, analytics, or affiliate tracking parameters.

FAIL https://example.com/go
  checked: https://example.com/go?gclid=configcrate-check
  1. HTTP 302 https://example.com/go?gclid=configcrate-check (84ms)
  2. HTTP 200 https://example.com/landing (121ms)
  x [parameter_lost] parameter "gclid" is lost after hop 1

Summary: checked=1 passed=0 errors=1 warnings=0

Built by ConfigCrate.

Why this exists

A redirect can return a perfectly healthy 200 OK landing page while removing the parameter that attributes an ad click, campaign, or commission. Generic uptime and broken-link checks see a working page. tracking-param-check follows the redirect chain without executing page JavaScript and reports where each selected parameter disappears or changes.

Common uses include:

  • Google Ads gclid, gbraid, and wbraid
  • Meta fbclid
  • Microsoft Ads msclkid
  • TikTok ttclid
  • utm_* campaign tags
  • custom affiliate, sub-ID, and click-ID parameters

Install

Download a binary from GitHub Releases, or install with Go:

go install github.com/configcrate/tracking-param-check/cmd/tracking-param-check@latest

Quick start

Inject and check one parameter:

tracking-param-check https://example.com/go --param gclid

Check several parameters:

tracking-param-check https://example.com/go \
  --param gclid \
  --param utm_source \
  --param utm_campaign

Use a built-in preset:

tracking-param-check https://example.com/go --preset common

If a selected parameter is absent from the input URL, the tool injects the sentinel value configcrate-check. Existing values are preserved and checked. When no --param or --preset is supplied, known tracking parameters already present in the URL are detected automatically.

Presets

Preset Parameters
ads gclid, fbclid, msclkid, ttclid
utm utm_source, utm_medium, utm_campaign, utm_term, utm_content
common gclid, fbclid, msclkid, utm_source, utm_medium, utm_campaign

Batch checks

Pass multiple URLs directly or use a file containing one URL per line:

tracking-param-check --file campaign-urls.txt --preset common

Blank lines and lines beginning with # are ignored. Use --file - for stdin.

JSON output

tracking-param-check https://example.com/go --param gclid --format json

JSON output includes the original URL, injected URL, every HTTP hop, parameter values at each hop, findings, final URL, timings, and a summary.

GitHub Action

name: Tracking link health

on:
  schedule:
    - cron: "17 6 * * *"
  workflow_dispatch:

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: configcrate/tracking-param-check@v0.1.0
        with:
          urls: |
            https://example.com/google-ads
            https://example.com/newsletter
          params: gclid,utm_source,utm_campaign

The action exits non-zero if a parameter is lost or changed, a request fails, the chain loops, too many redirects occur, or the final response is HTTP 4xx/5xx.

CLI reference

--param string          Parameter to inject/check; repeatable
--preset string         ads, common, or utm
--sentinel string       Injected value (default "configcrate-check")
--file string           Read one URL per line; use - for stdin
--format string         text or json (default "text")
--max-redirects int     Maximum redirects (default 10)
--timeout duration      Timeout per request (default 15s)
--header string         Request header as Name:Value; repeatable
--user-agent string     Custom HTTP User-Agent
--fail-on-warn          Treat warnings as failures
--version               Print version

Flags may appear before or after URLs.

Exit codes

Code Meaning
0 All checks passed
1 At least one check failed, or a warning with --fail-on-warn
2 Invalid arguments, input, or report error

Safety and limitations

  • Checks use HTTP GET, follow only HTTP Location redirects, and read at most 4 KiB of each response body.
  • Page JavaScript, browser storage, pixels, cookies, and form submissions are not executed or validated.
  • A parameter disappearing from the URL does not prove attribution is broken; a platform may intentionally exchange it for a first-party cookie or server record. Treat the result as a focused diagnostic signal.
  • Custom request headers are sent only to the original host and are not forwarded across host or port changes.
  • Only test URLs and hosts you are authorized to access.

Development

go test -count=1 ./...
go vet ./...
go build ./cmd/tracking-param-check

License

MIT

About

Find the redirect hop that drops advertising, analytics, or affiliate tracking parameters.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages