1. Help Center
  2. Build
  3. Setting Up a Campaign

Custom Variables

A Custom Variable enables capturing text or number with a Metric hit

Custom Value Capture is an option of a Metric. Enabling this option allows capturing text or numbers from the page source or URL. Custom Variables can also be sent with JavaScript using EventTrack, which utilizes capturing the value parameter in the URL.

Common uses of this are capturing logged in status, sub total, cart item count, search term, page title, order ID, and SKU.

Setting Custom Value Capture to On will produce additional configuration options. There are two types of Values that can be captured, Numeric and Custom (Text).

  • Numeric Measurement: Used for any number that that system can perform statistics on (sum, average, etc.) such as sub total and cart item count. This number can be whole or decimal.
  • Custom Variable: Used to capture a string in most cases but can also be used to capture a number that you don't want SiteSpect to perform statistics on.
    • Visit Level: Capture all unique text within a visit. If the the text that is captured during the visit is "abc", "xyz", "abc" - the unique values will be capture and comma separated, like: "abc, xyz" (e.g. two unique page titles visited "personalized and targeted audience segmentation, a/b testing and multivariate testing solution")
    • Page Level: A JSON structure with time stamp and captured text pairs. Each time the Metric is triggered will be included regardless of if the text captured is unique within the visit. [{"t":"1627315938", "v":"text string 1"}, {"t":"1627315946", "v":"text string 2"}, {"t":"1627315953", "v":"text string 1"}]

Note: If you don't see the Page Level option, please check with your Account Manager as this is a system setting that would need to be enabled.