SaTracking
ValidationNEWIntermediate

Preserve page location and referrer context in SPA analytics

Practical implementation and validation guidance for history changes, page_location, page_referrer and virtual page views.

Download for AI (.txt)

Want to check this in your browser? Run the local audit.

Measurement topic illustration · SaTracking

Define the measurement contract

Clarify the business question and define the expected behavior for history changes, page_location, page_referrer and virtual page views. Specify the event or data scope, responsible system, identity assumptions and applicable consent rules. Identify which downstream reports or destinations depend on the result.

Implementation approach

Define one page-view strategy for route changes; update location and referrer context in the correct order; prevent automatic and manual duplicate page views; test back/forward navigation, query strings and direct entry. Record required fields, accepted values, timing and ownership. Keep configuration changes reviewable and avoid relying on undocumented defaults.

Validation and failure cases

Test normal, denied, missing, malformed, delayed and repeated scenarios as appropriate. Inspect the browser or server request, event timeline and platform diagnostics. Verify that a successful preview corresponds to the expected production payload and that failures are observable.

Release and maintenance

Version the contract and configuration; document dependencies, reviewer, release date and rollback path. Monitor data completeness and unexpected changes. Revalidate after site releases, CMP changes, platform specification updates or changes to the business lifecycle.

Operational checklist

  • Is the expected behavior and owner explicit?
  • Are consent and identity assumptions documented?
  • Are field types, values and timing validated?
  • Have negative and duplicate cases been tested?
  • Is rollback and ongoing monitoring defined?

Further reading

Official references

EDITORIAL HISTORY

What changed

  1. v1.0
    Created an original bilingual analytics implementation guide with explicit contracts, validation and release controls.
MEASUREMENT SUPPORT

Need a hand with your tracking?

Nicolas Salazar works with teams on analytics, tracking plans, data quality, consent, and implementation.