Link Attribution (vxl_* parameters)
Vexal SmartBlocks captures first-party link attribution from URL query parameters prefixed with vxl_. Values persist for the visitor session and attach to tracked actions such as forms, click-to-call, and downloads.
Standard parameters
| Parameter | Purpose | Example |
|---|---|---|
vxl_campaign | Campaign name or slug | spring-promo |
vxl_page | Page context (landing or content type) | services |
vxl_section | Section within the page | hero |
vxl_action | Intended CTA or action type | quote |
Additional keys may use the vxl_ prefix for future extensions. The full bag is stored as metadata on each event (max 20 keys, 120 characters per value).
Example tracked URL
https://example.com/services/?vxl_campaign=spring-promo&vxl_page=services&vxl_section=hero&vxl_action=quote
Recorded event fields
- Campaign, Page, Section, Action (from standard keys)
- Timestamp (UTC)
- Session ID and Visitor ID (first-party, no PII)
- Referrer and Landing Page
- Event type (pageview, contact_form, quote_form, click_to_call, download, conversion)
Frontend integration
When SmartBlocks link attribution is enabled, the plugin enqueues vxl-link-attribution.js and exposes window.VexalLinkAttribution:
VexalLinkAttribution.getAttribution()— current session attribution bagVexalLinkAttribution.recordEvent(type, extra)— record a custom eventVexalLinkAttribution.attachToFormData(formData)— append attribution toFormData
PHP: smartblocks_get_stored_link_attribution() and smartblocks_record_link_attribution_event().
Admin
Open SmartBlocks → Vexal activity → Link attribution for analytics filters (Campaign, Section, Action, Conversion) and the Tracking Link Generator.
Storage model
Client: sessionStorage for tab session plus a session-scoped first-party cookie vxl_attr so form POSTs include attribution. Visitor ID uses localStorage (vxl_vid) for cross-session correlation without cookies when possible.
Future scope
A/B testing and multi-touch models are not part of v1. Use campaign slugs consistently and extend via additional vxl_* keys as needed.