Last updated 26 November 2026. By Paul Badarau.
A fictional newsletter links to a bike shop's site as /lights?ref=newsletter&color=red. The shop's Pages report shows one row, /lights. A visitor who searches the shop for "rear light" lands on /search?q=rear+light, and the report shows /search. Neither the ref value nor the search words reach PostDeploy.
The script cleans every address before it sends a pageview:
- It keeps the path, plus
utm_sourceandutm_campaignwhen they are present. Each kept value is cut to 100 characters. - It removes every other query parameter, including
ref,q,utm_medium,utm_termandutm_content. - It removes the fragment, so
/docs#installand/docs#faqare both/docs. - It keeps only the host of the referring page, never its path.
Because this happens in the browser, the removed parts never reach the server. There is nothing to recover later, and no setting keeps an extra parameter.
What to do instead:
- Tag links you control with
utm_source, such as?utm_source=newsletter&utm_campaign=november. If you usedutm_mediumorutm_contentto tell two links apart, put that detail into the campaign value, such asnovember-footer. - For links other people add with
?ref=, rely on the referrer. PostDeploy stores the referring host, so the visit is still credited to that site when the browser sends a referrer. - To count site searches, add a page goal for
/search. Page goals need no code. To count searches that found nothing, add a named event goal calledsearch_no_resultsand callpostdeploy.track('search_no_results')when the results list is empty. - If two versions of a page must be counted apart, give them different paths, such as
/product/42, instead of/product?id=42.
The limit people miss is the router. A single-page app that changes only the fragment, as in /#/pricing, records one page for the whole visit. Use path-based routes if you want each screen in the Pages report.
The product page for this is Analytics.