There are cases where you might need to see comprehensive debugging information on a live page that is flowing through SiteSpect
Uses
- See what SiteSpect objects applied to troubleshoot a client problem
- Understanding what the CDN is doing in front of SiteSpect
- Verifying personalization features are functioning as expected
- Showing the client what headers are getting proxied to the origin
Note: Depending upon your configuration, this functionality will require the use of a secret SiteSpect Debug Header Key. Please work with SiteSpect Solutions Architecture to set up this feature.
To enable the debug information that will be inserted directly into the bottom of your page, send the following header and value. The value will be either "1" (show debug info on html pages) or "all" (show debug info in response headers), and this is after the secret key if used (e.g value of secretkey-1).
X-SiteSpect-Debug: 1
To do this easily from the browser, use a browser extension such as ModHeader and set up a rule to send this header on the request.
Then visit the page and you will see something like:
==============================================================
==================== Request Time ============================
Request Time: Wed Nov 18 21:21:10 2020 GMT (1605734470)
==============================================================
==================== Request URL =============================
Request URL: /
==============================================================
==================== Request Method ==========================
Request method: GET
==============================================================
=================== Request Aborted ==========================
Request aborted: No
==============================================================
============ HTTP Response code from Origin ==================
Response code: 200 OK
==============================================================
================== TC_ID:VG_ID pairs =========================
TC:VG Pairs: 54296:1959245,55812:2006811,55814:2006819,55248:1994096,58634:2108975
==============================================================
======================== GUID ================================
GUID: 6878383686979601991
==============================================================
======================== Timings for Hit Objects =============
454699 (SV) - 5.2ms
4633150 (SV) - 0.3ms
1371694 (RP) - 0.5ms
4945237 (Variation) - 0.2ms
4874761 (Variation) - 0.0ms
4921142 (Variation) - 0.0ms
4414604 (SV) - 1.0ms
2086311 (SV) - 0.9ms
..
Full Header information
..
'ObjectDisable_List' => [],
'UserIsRobot' => 0,
'UserVisit_CapturedValue' => 0,
'FetchedOtherData' => 1,
'User_InitialVisitTime' => 1601498501,
'ResponsepointHits' => 4,
'Ran_UM_ANTCA' => 1,
'AncillaryCookie_Set' => 0,
'NewUser' => 0,
'InVisitTCData' => [],
'HumanTestInjected' => 0,
'LogUserType' => 1,
'UpdateHumanTestInjected' => 0,
'User_GUID' => '6878383686979601991',
'AssistantMode' => 0,
'SkipCampaignVariations' => 0,
'UserVisit_ResponsepointHits' => 4,
'Site_ID' => '336',
'Ran_UM_CFTCE' => 1,
'User_VisitCount' => 13,
'IsPreview' => 0,
'IgnoreQuickChanges' => 0,
'UserAsmtHistory' => [
..
Full List of Campaigns
..
'TotalCapturedValue' => 0,
'UserType' => 3,
'UserVisit_StartTime' => 1605734470,
'HasPreviewData' => 0,
'BaselineRPHitHistory' => [
{
'NumHits' => 63,
'RecentHitTime' => '1605734470',
'ID' => 1371694,
'FirstHitTime' => 1601498810
}
],
'UserVisit_RecentRequestTime' => 1605197770,
'MostRecentRPV_ID' => 'SV 2933637',
'UserVisit_HitRating' => 0,
'CustomVariableList' => [
..
'PreviewPopUpSetting' => 0,
'UpdateOtherData' => 1,
'CookieVersion' => 8,
'PreviewExcludeRPV_ID' => 0,
'UserVisit_RefererUrl' => undef,
'Increment_UserVisit_Pageviews' => 1,
'UpdateTrackingData' => 1,
'Ran_UM_CNAUV' => 1,
'LogRecentRequestTime' => 1,
'SiteVariationHits' => 10,
'AffinityCookie_TimeSinceAsmtLimit' => 93312000,
'HaveNotAttemptedAssignmentForAllCampaigns' => 0,
'IgnoreSiteVariations' => 0,
'NewVisit' => 1,
'TestCampaign_TimeSinceAsmtLimit' => 0,
'UserVisit_VariationHits' => 6,
'User_AffinityCookieExpire' => 0,
'UserVisit_Pageviews' => 0,
'UserVisit_EntryPageUrl' => 'https://www.sitespect.com/',
'VariationHits' => 6,
'UserVisit_EntrySiteIdentity_ID' => '1019',
'FullPreview' => 0,
'TestCampaign_Hash' => {
Full List of Counted Campaigns
..
If you don't see this display at the bottom of the page, ensure that the page is routing (has a response header of RTSS) and that check the raw page source as CSS or page structure could be hiding this block of information.
This technique is for debugging purposes only and should not be used by a general user or in a campaign.
Fields
-
Request Time - The time the request was received by SiteSpect. Both long data form and epoch time are given.
-
Request URL - The URL that was requested. There are times where the cdn in front of us changes the URL.
-
Request Method - The HTTP method for the request.
-
Request Aborted - Did the client in front of SiteSpect abort the request. Typically catches someone hitting the "stop" browser button.
-
HTTP Response code from Origin - The HTTP response received from the origin (behind SiteSpect).
-
TC_ID:VG_ID pairs - The test campaign ID / variation group ID pairs for this particular user. Each pair has a colon (':') separating the values and pairs are separated by commas (',').
-
GUID - The SiteSpect GUID for this request.
-
Timings for Hit Objects -Shows the SiteSpect objects that got applied on this request. The format is SiteSpect ID, object type and then number of cpu seconds it took to apply. The order is based on when the object applied except for campaign variations which always appear at the end of the list (sorry). Helpful links for finding the objects in the control panel:
- SV (Site Variations) - /SiteVariation_One?Site_ID=*SITE_ID*&Variation_ID=*ID*
- CV (Campaign Variations) - /SiteVariation_One?Site_ID=*SITE_ID*&Variation_ID=*ID*
- RP (Response Point) - /Responsepoint_One?Site_ID=*SITE_ID*&Responsepoint_ID=*ID*
- Control (Control Variation) -
- Variation (Variation within a Factor) - /Variation_One?Site_ID=*SITE_ID*&Variation_ID=*ID*
- QC (Quick Change) - /Variation_One?Site_ID=*SITE_ID*&Variation_ID=*ID*
-
Headers Start - The request headers we received from the client. Typically, the headers are from the CDN in front of us.
-
Headers Middle - The request headers we sent to the origin (backend) and the response headers we received from the origin. SiteSpect can manipulate the request headers sent to the origin (X-Forwarded-For, origin factors, request headers feature on site identity page, etc)
-
Headers End - Near the end of SiteSpect processing, the request headers we sent to the origin (should match what appears in 'Headers Middle') and the response headers that SiteSpect will respond to. Changes to Cache-Control, SiteSpect cookies, origin factors will appear here. Response headers feature on the site identity page will not appear here (as they are applied later in the apache cycle).
-
AUV Object - A perl dump of the ActiveUserVisit object within the codebase. The ResponsepointHits_List and SiteVariationHits_List have been removed as they can the regex-es that applied on the page and we didn't want our clients competitors somehow seeing this info (think optimizely spy bookmarklet). Most of the time, this dump will be useful to send Dev to help troubleshoot application bugs. I wanted to call out the following things that will be useful to everyone:
- UserType
- 0 = we have not yet injected the robot test for this user
- 1 = we have injected the robot test for this user
- 2 = we got a robot test response from the user and there were no SiteSpect cookies
- 3 = we got a robot test response that looks good. They are NOT a robot!
- 4 = robot test is off for this client
- 5 = we have been instructed to ignore the robot test for this user. This is typically a native mobile app user and we have configured a header name / value to skip the robot test.
- UserIsRobot - If 1, SiteSpect thinks this user is a bot.
- TestCampaign_Hash -> AsmtCounted - What campaigns this user is counted in.
- BaselineRPHitHistory - Data structure that shows info regarding RP's used for personalization.
- CustomVariableList - Data structure that shows info regarding custom variables used for personalization.
- UserType
Notes
- The header X-Forwarded-For should contain a list of each entity making a request. For clients using a CDN in front of SiteSpect we should see: (1) In Headers Start the header containing the IP address of the end-user. (2) In Headers Middle, the same header listing the end-user's IP address, with the IP address of the CDN end point appended. If the CDN does not send us the X-Forwarded-For header, our Apache server will create one containing the IP address of the CDN's end point.