| 开发者 |
presswell
benplum |
|---|---|
| 更新时间 | 2026年11月4日 23:43 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
utm_source, utm_medium, utm_campaign, utm_content, utm_term, gclid, fbclid, msclkid, ttclid, landing_page, landing_query, and referrerutm_source, referrer, ...): replaced whenever the visitor arrives on a URL with any tracked parameter. Untagged visits, such as internal navigation, direct, or organic, keep the current values.first_utm_source, first_referrer, ...): recorded from the first visit with a source and never replaced while the stored record lasts. A direct visit (no tracked parameters and no referrer from another site, such as a typed address or bookmark) holds the spot only until a tagged or referred visit arrives.utm_source, ...), holding that model's values.
Values share one record in browser localStorage. It expires once the Attribution Expiry passes with no page views (7 days by default, up to one year), and the next visit starts a new record. A longer expiry keeps first-touch attribution across more widely spaced visits; a shorter one makes last touch reset sooner.
Changing the model only affects new submissions. Existing entries keep the values they were saved with, so with a single model, a field such as utm_source can mean different things before and after the change.
landing_page, landing_query, and referrer always describe the visit itself and can't be set through the query string.
Capture Methods
[tracking-all], [tracking-utm_source] (listed in the Mail panel){tracking.all}, {tracking.utm_source}[tracking_all], [tracking_utm_source] (or {tracking_all}, {tracking_utm_source}){tracking_all}, {tracking_utm_source}{tracking:all}, {tracking:utm_source}{tracking_all}, {tracking_utm_source}utm_source stands for any tracking key. The all-values tag lists one key: value per line, except in Gravity Forms, where it's a single line (utm_source=google, utm_medium=cpc), and Fluent Forms, which labels each line from its key (Utm Source: google). Keys with no value are left out.
pwtsr_tracking_keys( $keys, $context )
core, contactform7, fluentforms, formidable, forminator, gravityforms, or wpforms).core context and from every active form plugin's context.first_ copy of each key is added automatically.core; one TTL applies to the whole page.core; one storage key applies to the whole page.true while a supported form plugin is active.false to load it only on pages that render a form. Attribution from visitors who land on other pages is then lost.both, last, or first. Defaults to the Attribution Model setting.core value.both.marketing.[ 'utm_source' => 'google', ... ]), before the form plugin saves them. Empty values are left out.contactform7, fluentforms, formidable, forminator, gravityforms, or wpforms).WPCF7_ContactForm object, a form ID (Fluent Forms, Formidable Forms, Forminator), the form array (Gravity Forms), or the form data array (WPForms).null when it stores none (Contact Form 7, WPForms Lite, or Forminator with entry storage off).pwtsr_tracking_values.pwtsr:captured event on document. event.detail holds values (the stored record), replaced (whether this page view set the attribution values), and model:
document.addEventListener( 'pwtsr:captured', function( event ) {
if ( event.detail.replaced ) {
console.log( event.detail.values.utm_source );
}
} );
It fires once per page view, and not until consent is given when Visitor Consent is on.
Consent
With Visitor Consent on, the script reads and stores nothing until the visitor consents. Consent plugins that support the WP Consent API work without setup. Other consent banners can use the JavaScript interface:
// After the visitor accepts, or on each page load once they have.
presswellSignalRelay.setConsent( true );
// When the visitor withdraws consent; the stored record is removed.
presswellSignalRelay.setConsent( false );
// Whether attribution is currently being stored.
presswellSignalRelay.hasConsent();
A script that runs before Tracking Signal Relay loads can set window.presswellSignalRelayConsent = true instead. Attribution on the page where consent is given is still captured, but parameters on pages viewed before consent are lost.
Default Tracking Keys
utm_sourceutm_mediumutm_campaignutm_contentutm_termgclidfbclidmsclkidttclidlanding_pagelanding_queryreferrerfirst_, such as first_utm_source.
Settings and Debug Display
Use Settings -> Tracking Signal Relay to:
wp-content/plugins/.
Configuration
UTM parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term), common ad click IDs (gclid, fbclid, msclkid, ttclid), plus landing_page, landing_query, and referrer.
No. Contact Form 7 and Forminator forms get tracking inputs automatically. In Fluent Forms, Formidable Forms, Gravity Forms, and WPForms, add the Tracking field to each form. The plugin's script then fills the inputs when the form renders.
By default, until 7 days pass with no page views. Change it with Attribution Expiry in the settings, or the pwtsr_tracking_ttl filter.
By default, both the first and the most recent. Last-touch keys (utm_source) hold the latest tagged visit; first-touch keys (first_utm_source) hold the visit that started the record. Pick one model instead in the settings. See Attribution Model above.
Yes. Use the pwtsr_tracking_keys filter or add custom parameters in Settings -> Tracking Signal Relay.
We plan to support additional form ecosystems, but each integration requires reliable extension points for hidden field rendering, submission lifecycle hooks, entry persistence, and token/merge-tag resolution. Some form plugins do not expose these capabilities consistently enough to deliver a production-ready adapter. We are also prioritizing support for plugins with transparent licensing, complete core functionality, and a respectful user experience.