Profile and variable glossary
This page lists profiles, variables, and parameters that are useful in profile scripts.
Built-In Profiles section_2B694370003C4F8E8E29E0B2F6E52045
user.activeCampaigns
user.header profiles are built-in from mbox request header dataYou 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.
Note: user.header(‘x-cluster-client-ip’) has been deprecated.
user.setLocal.Visitor device is a tablet.
NOTE: This profile replaces the deprecated legacy Browser is iPad audience category. See Browser for more information.
Visitor device is a mobile phone.
NOTE: This profile replaces the deprecated legacy Browser is iPhone audience category. See Browser for more information.
profile.parameter or user.parameter.URL Variables section_8F25958273164EBAA6DC659302993FD3
landingreferrerpagelanding.urlreferrer.urlpage.urllanding.domainreferrer.domainpage.domainlanding.protocolreferrer.protocolpage.protocollanding.paramreferrer.parampage.paramlanding.queryreferrer.querypage.queryGeo and Mobile Carrier Profiles section_08441DA42E7346918FBB345818854997
profile.geolocation.countryprofile.geolocation.stateprofile.geolocation.cityprofile.geolocation.zipprofile.geolocation.dmaprofile.geolocation.domainNameprofile.geolocation.ispNameprofile.geolocation.connectionSpeedprofile.geolocation.mobileCarrierprofile.geolocation.latitudeprofile.geolocation.longitude
Mbox Variables section_C42F0D33BD8044BE812FA0B7905CC0ED
mbox.nameParameters 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’)
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 section_62B4821EB6564FF4A14159A837AD4EDB
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.
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: This page lists the profiles, variables, and parameters that are useful in profile scripts.
Intents:
- Find a built-in profile to use in a profile script.
- Look up the URL variables (
landing,referrer,page). - Look up the geo and mobile carrier profiles.
- Look up the mbox variables and the parameters passed with mbox requests.
- Reference customer attributes in profile scripts and in offers.
Glossary:
user.setLocal('param_name','value'): creates persisted profile values within a profile script. These values persist just like a profile script, but you only have access to them within the script where they were set. (product-specific)user.getLocal('param_name'): retrieves the value that you set usinguser.setLocal. (product-specific)user.parameter: persistent profile attributes created from profile scripts. It also references “system” profiles like geolocation, visit count, and so on. (product-specific)profile.parameter('parameter_name'): mbox parameters that are made persistent due to theirprofile.prefix. (product-specific)parameter=: generic term for additional values passed with an mbox, usually as name/value pairs. It is not persistent unless made so withprofile.parameteroruser.parameter. (product-specific)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. (product-specific)mboxPageValue: in each mbox call, the page is assigned a value. (product-specific)mboxDebug: only used for debug info. It is added to the page URL where at.js looks for it. (product-specific)mboxOverride.browserIp: sets a different geo than the actual location so you can test how something would look in another location. (product-specific)profile.browserTime: the visitor’s local browser time. For system time, create a new date object in the profile script. (product-specific)
Guardrails:
mboxOverrideparameters should be used only while testing the activity and not in production. The use of anymboxOverrideparameters can cause reporting discrepancies when using Analytics for Target (A4T).user.header('referrer')does not work for Internet Explorer.user.header('x-cluster-client-ip')has been deprecated.
Terminology:
- Acronym: A4T (Analytics for Target)
- Synonyms:
user.activeActivities=user.activeCampaigns(both return the campaign ID for all campaigns/activities that the user is in, even if the user has not interacted with the campaign/activity in the current session) - Replaces:
profile.mobile.isTabletreplaces the deprecated legacy Browser is iPad audience category;profile.mobile.isMobilePhonereplaces the deprecated legacy Browser is iPhone audience category - Do not confuse: the public-facing IP address returned by
user.header('x-forwarded-for')≠ the NAT address (internal address), which starts with 10., 192.168., or 172.
FAQ:
- What is the correct way to obtain a profile parameter to use in a profile script? The correct way is the
profile.get('param_name')method. - How are customer attributes referenced in profile scripts? Customer attributes can be referenced in profile scripts, formatted as
crs.get('<Datasource Name>.<Attribute name>'). - Can customer attributes be used in offers without a profile script? Yes. Customer 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}, and spaces in thedatasourceNameshould be stripped from any API call. - Which mbox parameters are 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'), andmbox.param('screenWidth'). - Which mbox parameters are passed with order mboxes?
mbox.param('orderId'),mbox.param('orderTotal'), andmbox.param('productPurchasedId'). - Which profiles are available for geo and mobile carrier data?
profile.geolocation.country,state,city,zip,dma,domainName,ispName,connectionSpeed,mobileCarrier,latitude, andlongitude, each prefixed withprofile.geolocation..
Best practices:
- While testing an activity, use Activity QA mode to ensure that the activity works as expected before pushing the activity into the live environment.
Related pages:
- Legacy audience categories that
profile.mobile.isTabletandprofile.mobile.isMobilePhonereplace: Browser (c-target/c-audiences/c-target-rules/browser.md) - Reporting discrepancies when using mboxOverride parameters: Analytics for Target (c-integrating-target-with-mac/a4t/a4t.md)
- Testing an activity before pushing it into the live environment: Activity QA mode (c-activities/c-activity-qa/activity-qa.md)
Personas:
- marketer: Can use customer attributes as tokens directly in offers, without first requiring a profile script, with the token form
${crs.datasourceName.attributeName}. The page states that spaces in thedatasourceNameshould be stripped from any API call. Where: “FAQ”. - developer: Can obtain a profile parameter in a profile script with the
profile.get('param_name')method and reference customer attributes withcrs.get('<Datasource Name>.<Attribute name>'). Can look up the mbox parameters passed with order mboxes:mbox.param('orderId'),mbox.param('orderTotal')andmbox.param('productPurchasedId'). Where: “FAQ”.
Onboarding:
- Level: Experienced
- First minimal step: Reference a customer attribute in a profile script with
crs.get('<Datasource Name>.<Attribute name>'). - Next: Testing an activity before pushing it into the live environment: Activity QA mode (c-activities/c-activity-qa/activity-qa.md)