This is just a thought, but maybe we should create a custom "shortlink" entity type (submodule?) to provide affiliates with a cleaner, more manageable alternative to query parameter-based tracking.

Entity Structure

  • Affiliate ID (entity reference)
  • Campaign code (string)
  • Target URL (URI field)
  • Status (boolean - enabled/disabled)
  • Created/updated timestamps
  • Visit count (computed or separate analytics table)

Considerations

  • Canonical route /shortlink/{shortlink} handles tracking and redirection
  • On access: log affiliate visit, increment counter, perform 301/302 redirect to target URL
  • Admin UI provides per-affiliate shortlink management with enable/disable toggles
  • Views integration for performance reporting (visits, conversions, etc.)
  • Should visit logging be async (queue) to avoid slowing redirects?
  • Tie into existing click tracking or maintain separate analytics table for these enties only? maybe a reference ont he click entity if it comes from a shortlink entity?
  • Support scheduled start/end dates for time-limited campaigns?
  • What happens if a sortlink is inactive? 404? rediretc to homepage?

Comments

loze created an issue.