Client Code (Web SDK) - Customer Passed Parameters

Customer Passed Parameters (CPPs)

Customer Passed Parameters (CPPs) are used to send data points available on the client’s website along with the survey response. The value of these parameters can be used for segmenting the client’s respondent data. The client may send as many parameters as desired using the methods described in this topic. ForeSee suggests limiting CPP’s to meaningful data intended for specific reporting for a couple of reasons:

  1. Adding CPP’s may increase cookie size
  2. IE limits the number of characters in a URL string to 2084 including the URL to the survey. If additional CPP’s cause the URL to exceed this limit, data may not be passed with the survey and unavailable in the respondent data.

Method 1: The CPP API

The API in the Setting a CPP code sample below can be used to manually set a CPP on the client’s site. This line can be duplicated as many times as desired, taking care that it’s placed below the Client code snippet (versions 18x and above) or the call to foresee-trigger.js (versions below 18x) on the page.

In the following example, ‘name’ is the name of the CPP to be passed and viable in the portal. The value can be either a static hard-coded value, or a dynamic variable which can be customized to pass whatever data is preferred.

Setting a CPP:

// This should appear below the foresee embed snippet
fsReady(function() {

Method 2: Adding CPPs to the Client Code Configurations


The following capabilities will need to be added by a member of the implementation team. You can request these changes from your ForeSee client contact.

  • Pass the value of a JavaScript variable – using JavaScript variable name/value
  • Pass the value of a cookie – using cookie name
  • Create a CPP using a URL – e.g. if the URL string contains “xyz” set a value of “Y”
  • Create a CPP using a URL query string parameter – e.g. Find “paramname=” in the URL and grab the value.


How to know if CPPs are being passed

Method 1: fsr.s cookie (Client Code 19.0.x and below)

Open the fsr.s cookie to view the parameters inside the “cp” attribute. CPPs are listed as name then current value to be passed.


Method 2: Survey URL

When a survey questionnaire appears, find the CPP parameters in the URL string:[orderDate]=12%2F22%2F2010&cpp[TLSessionID]=4EEBFE540DE2100D7A51B7D51C444613&cpp[browser]=Firefox%203.6&cpp[os]=Windows&cpp[pv]=2&cpp[url][ref_url]=&cpp[locale]=en&cpp[site][section]=&cpp[referrer]=&cpp[terms]=&cpp[sessionid]=1293032648063_751683&cpp[replay_id]=&cpp[flash]=10

Articles in this section:

  1. Default CPP's