PHPackages                             log1x/redirection-variables - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. log1x/redirection-variables

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

log1x/redirection-variables
===========================

Provides referer tracking variables for popular WordPress redirection plugins.

v1.0.4(2y ago)7865MITPHPPHP ^8.1

Since Nov 6Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Log1x/redirection-variables)[ Packagist](https://packagist.org/packages/log1x/redirection-variables)[ GitHub Sponsors](https://github.com/Log1x)[ RSS](/packages/log1x-redirection-variables/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Redirection Variables
=====================

[](#redirection-variables)

[![Latest Stable Version](https://camo.githubusercontent.com/29093a67fa2831170fd6a3ab64eaa7500b64e50eeecd2719b07b831c1a5d406d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6731782f7265646972656374696f6e2d7661726961626c65733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/29093a67fa2831170fd6a3ab64eaa7500b64e50eeecd2719b07b831c1a5d406d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6731782f7265646972656374696f6e2d7661726961626c65733f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/26825dc69456c717aacd9299c37847a7e2928203ed8ff71dfead0cc92d545297/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6731782f7265646972656374696f6e2d7661726961626c65733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/26825dc69456c717aacd9299c37847a7e2928203ed8ff71dfead0cc92d545297/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6731782f7265646972656374696f6e2d7661726961626c65733f7374796c653d666c61742d737175617265)

Redirection Variables adds a few handy referer tracking variables usable inside of redirects created by the WordPress plugins [Redirection](https://wordpress.org/plugins/redirection/), [Safe Redirect Manager](https://wordpress.org/plugins/safe-redirect-manager/), and [Pretty Links](https://wordpress.org/plugins/pretty-link/).

This can be particularly useful for passing tracking data from your referring posts/pages to affiliate URL's.

Requirements
------------

[](#requirements)

- [PHP](https://secure.php.net/manual/en/install.php) &gt;= 8.1
- [Composer](https://getcomposer.org/download/)

Installation
------------

[](#installation)

### Bedrock

[](#bedrock)

Install via Composer:

```
$ composer require log1x/redirection-variables
```

### Manual

[](#manual)

Download the release `.zip` and install into `wp-content/plugins`.

Usage
-----

[](#usage)

An example redirect URL destination would look something like:

```
/go/google -> https://www.google.com/?example=%source%&example2=%post_name%
```

### Variables

[](#variables)

VariableDescriptionExample ValueDefault Value`%source%`The referring page source determined by `utm_source` or the `HTTP_REFERER` variable.googledirect`%medium%`The referring page medium determined by `utm_medium`.searchorganic`%campaign%`The referring page campaign determined by `utm_campaign`.summer-saleunknown`%term%`The referring page campaign determined by `utm_term`.fish-oilunknown`%content%`The referring page content determined by `utm_content`.cta-linkunknown`%adgroup%`The referring page adgroup determined by `utm_adgroup`.ppc-1unknown`%search_term%`The referring page search term passed by various search engines.Best Fish Oilunknown`%gclid%`The referring page gclid passed by Google Ads.lorem-1234unknown`%post_id%`The referring page post ID.17unknown`%post_title%`The referring page post title.the-best-fish-oil-of-2020unknown`%post_name%`The referring page post name (slug).best-fish-oilunknownBug Reports
-----------

[](#bug-reports)

If you discover a bug in Redirection Variables, please [open an issue](https://github.com/log1x/redirection-variables/issues).

Contributing
------------

[](#contributing)

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.

License
-------

[](#license)

Redirection Variables is provided under the [MIT License](https://github.com/log1x/redirection-variables/blob/master/LICENSE.md).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~311 days

Total

5

Last Release

777d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.2.5

v1.0.2PHP ^8.0

v1.0.3PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5745907?v=4)[Brandon](/maintainers/Log1x)[@Log1x](https://github.com/Log1x)

---

Top Contributors

[![Log1x](https://avatars.githubusercontent.com/u/5745907?v=4)](https://github.com/Log1x "Log1x (11 commits)")

---

Tags

wordpress

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/log1x-redirection-variables/health.svg)

```
[![Health](https://phpackages.com/badges/log1x-redirection-variables/health.svg)](https://phpackages.com/packages/log1x-redirection-variables)
```

###  Alternatives

[tgmpa/tgm-plugin-activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins).

1.8k222.5k13](/packages/tgmpa-tgm-plugin-activation)[aristath/kirki

Extending the WordPress customizer

1.3k73.0k4](/packages/aristath-kirki)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
