| 开发者 | dghizoni |
|---|---|
| 更新时间 | 2026年10月17日 12:18 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-3.0-or-later |
| 版权网址: | 版权信息 |
[wpat_last_source] or any other token in the mail
template. There is also a hidden field tag, [wpat_hidden last_source], for
the form itself.{wpat_last_source} anywhere WPForms accepts a smart tag: a
notification, a confirmation, or a stored entry.{wpat.last_source} in a notification, a confirmation or
an integration, or name a hidden field after a token and it fills itself.{wpat:last_source} in a notification, an action, or a
hidden field's default value.[wpat_last_source] in the form's email, alongside
Elementor's own field references.utm_source, utm_medium, utm_campaign, utm_term, utm_contentutm_id, utm_source_platform, utm_creative_format, utm_marketing_tacticgclid, gbraid, wbraid, fbclid, msclkidYes, and that is the point. Capture and storage happen in the browser, so no cached page can ever hold or leak one visitor's attribution.
First touch is the campaign that introduced the visitor to your site. Last touch is the one they arrived through when they finally converted. Both are kept, so you can credit the ad that found them and the email that closed them.
A direct visit is recorded, as a Direct channel touch. If nothing at all appears, JavaScript did not run, or the browser had cookies blocked.
90 days by default, and up to 730 under Attribution → Settings. Safari and every browser on iPhone cap a cookie written by JavaScript at seven days, so the plugin also has the server set the same cookie, which is not capped. That request goes to a small endpoint that is never part of the cached page, and if it ever fails the next page view simply tries again.
Write the token in the mail template with a wpat_ prefix, for example
[wpat_last_source], [wpat_first_campaign] or [wpat_last_channel]. Contact
Form 7 does not store submissions, so the email is where the value is kept. To
put it in the form itself instead, add [wpat_hidden last_source] to the form
template.
Write the token as a smart tag, for example {wpat_last_source}. It works
anywhere WPForms accepts text. Smart tags are used rather than a hidden field
because WPForms' Hidden Field is only available in WPForms Pro.
Write the token as a merge tag, for example {wpat:last_source}. To store it on
the submission, add a Hidden field, set its key to the token, for example
last_source, and type the matching merge tag as its default value.
The email tokens use Elementor's documented mail filter. Filling a hidden field relies on Elementor's submission record, so the plugin checks it is available first and otherwise leaves the field empty. A form never breaks because of it.
Yes. The first and last touch are copied onto the order at checkout and shown on the order screen. Orders created in the admin are not attributed.
Yes. Add them under Attribution → Settings, one per line, and each is captured and exposed as a form token like everything else.
Deactivating changes nothing. Deleting removes the plugin's own settings. Values already written into form entries and orders belong to those records and are left alone.