Vexal Documentation by WileyLabs

Link Attribution (vxl_* parameters)

Stable

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

ParameterPurposeExample
vxl_campaignCampaign name or slugspring-promo
vxl_pagePage context (landing or content type)services
vxl_sectionSection within the pagehero
vxl_actionIntended CTA or action typequote

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 bag
  • VexalLinkAttribution.recordEvent(type, extra) — record a custom event
  • VexalLinkAttribution.attachToFormData(formData) — append attribution to FormData

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.