Show Menu
TOPICS×

Profile and variable glossary

This page lists profiles, variables, and parameters that are useful in profile scripts.

Built-In Profiles

Profile
Notes
user.activeActivities
user.activeCampaigns
Return the campaign ID for all campaigns/activities that the user is in, even if he or she has not interacted with the campaign/activity in the current session.
user.pcId
user.sessionId
user.categoryAffinity
user.categoryAffinities
Return an array of the affinities that a visitor has populated
user.isFirstSession
user.isNewSession
user.daysSinceLastVisit
user.browser
The user agent
user.header
All user.header profiles are built-in from mbox request header data
user.header('x-cluster-client-ip')
The public-facing IP address of the network connection that the visitor is on.
You can get this in several ways, for example whatismyip.com . The IP address is not the NAT address (internal address), starting with 10., 192.168., or 172.
user.header('host')
Website hostname
user.header('cookie')
Visitor cookie data
user.header('user-agent')
Visitor browser user-agent
user.header('accept-language')
Visitor language
user.header('accept-encoding')
Visitor character encoding
user.header('accept')
Visitor language and character encoding
user.header('connection')
Server connection. For example: keep-live
user.header('referrer')
Website URL of visitor current page. Does not work for Internet Explorer.
user.getLocal('param_name','value');
user.setLocal('param_name','value');
user.get('param_name')
user.parameter
Persistent profile attributes created from profile scripts. Also references “system” profiles like geolocation, visit count, etc.
profile.get('param_name')
profile.param('param_name');
profile.parameter('parameter_name');
Mbox parameters that are made persistent due to their profile. prefix.
profile.browserTime
The visitor's local browser time. For system time, create a new date object in the profile script
profile.averageDaysBetweenVisits
profile.sessionCount
parameter=
Generic term for additional values passed with an mbox, usually as name/value pairs. Not persistent unless made so with profile.parameter or user.parameter .

URL Variables

landing
referrer
page
landing.url
referrer.url
page.url
landing.domain
referrer.domain
page.domain
landing.protocol
referrer.protocol
page.protocol
landing.param
referrer.param
page.param
landing.query
referrer.query
page.query

Geo and Mobile Carrier Profiles

  • profile.geolocation.country
  • profile.geolocation.state
  • profile.geolocation.city
  • profile.geolocation.zip
  • profile.geolocation.dma
  • profile.geolocation.domainName
  • profile.geolocation.ispName
  • profile.geolocation.connectionSpeed
  • profile.geolocation.mobileCarrier
  • profile.geolocation.latitude
  • profile.geolocation.longitude

Mbox Variables

Variable
Notes
mbox.name
mbox.param('param_name')
Parameters automatically passed with every request:
  • mbox.param('browserHeight')
  • mbox.param('browserTimeOffset')
  • mbox.param('browserWidth')
  • mbox.param('colorDepth')
  • mbox.param('mboxXDomain')
  • mbox.param('mboxTime')
  • mbox.param('screenHeight')
  • mbox.param('screenWidth')
Parameters passed with order mboxes:
  • mbox.param('orderId')
  • mbox.param('orderTotal')
  • mbox.param('productPurchasedId')
mbox3rdPartyId
An mbox parameter to sync a customer ID to Target's mboxPCID. A customer ID is an ID your company uses to track visitors, such as a CRM ID, membership ID, or something similar. This ID can then be used to add information via the Profile APIs and Customer Attributes .
mboxPageValue
In each mbox call the page is assigned a value.
mboxDebug
Only used for debug info. Added to the page url where the mbox.js looks for it.
mboxOverride.browserIp
Sets a different geo than the actual location so you can test how something would look in another location.
Note: Using mboxOverride parameters should be used only while testing the activity and not in production. The use of any mboxOverride parameters can cause reporting discrepancies when using Analytics for Target (A4T). You should use Activity QA mode while testing to ensure that your activity works as expected before pushing the activity into your live environment.

Customer Attributes

Customer attributes can be referenced in profile scripts, formatted as crs.get('<Datasource Name>.<Attribute name>') .
These attributes are also available as tokens in profile scripts and directly in offers without first requiring a profile script. The token should be in the form: ${crs.datasourceName.attributeName} . Note that spaces in the datasourceName should be stripped from any API call.