Profile and variable glossary

Last update: 2023-03-06

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

Built-In Profiles

Profile Notes
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.categoryAffinities Return an array of the affinities that a visitor has populated
user.browser The user agent
user.header All user.header profiles are built-in from mbox request header data
user.header(‘x-forwarded-for’) The public-facing IP address of the network connection that the visitor is on.
You can get this in several ways, for example The IP address is not the NAT address (internal address), starting with 10., 192.168., or 172.
Note: user.header(‘x-cluster-client-ip’) has been deprecated.
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’); Retrieve the value that you set using user.setLocal.
user.setLocal(‘param_name’,‘value’) Create persisted profile values within a profile script. These values persist just like a profile script, but you only have access to it within the script it was set.
user.parameter Persistent profile attributes created from profile scripts. Also references “system” profiles like geolocation, visit count, etc.
profile.get(‘param_name’) The correct way to obtain a profile parameter to use in a profile script is the profile.get(‘param_name’) method.
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
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.state
  • 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
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 at.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.

On this page