Displaying Real-Time Property Values in Load Mode

Document created by B-F-F08DRX Employee on Jul 20, 2017Last modified by B-F-F08DRX Employee on Jul 20, 2017
Version 2Show Document
  • View in full screen mode

In this example, we're going to create a property set/property to capture the value of cache-control from the response header.


First we will create our property set like below:




Next we need to create our property like below:





Next, we need to create a javascript that will capture our property value and set the value (or what we want to display in the dashboard) at the javascript level.


// JS Code 

var cache = $prop.value("Clip", "cacheControl") // this is the value of the property we want to view


var cacheValue = "Header Value: " + cache; // this is the value we want to display in the dashboards


$context.result.postMessage($context.result.LEVEL_INFO, "Cache Catch: " + cacheValue); // this will display values in "general" mode


$prop.set("Script", "cacheValue", cacheValue); // this sets the value we want to display at the 'script' level


// End JS Code 


I've saved the above JS as PostValToAnalytics and added it to clip after my page call where the properties are set:




Now we need to create our property on the javascript like below making sure we check the box for "save value for analytics."



To view your properties, real-time, you can create a new dashboard and add any of the following widgets:

Basic: Property Value Clip Element Analysis

Charts: Property Value Count

Charts: Properties by Value