Configuring Experience Optimization with the smarttarget_conf file (deprecated in-process setup)

Edit the smarttarget_conf.xml file in the configuration location of your website to configure Elasticsearch and Experience Optimization.

Before you begin

  • A Google Analytics service account is already set up and you have access to the configuration details.
  • The P12 key associated with your Google Analytics service account must be in a location accessible by Experience Optimization services.

Procedure

  1. In the configuration location of your website, open smarttarget_conf.xml for editing.
  2. Find the <SmartTarget> section.
  3. Set the value of the TimeZoneOffset element to the difference, in hours and minutes, from the Content Delivery system to the Content Manager system's local server time. For example, if the local time in the Content Manager server location is 5 and a half hours later than the local time in the Content Delivery server location, set TimeZoneOffset to +5:30.
  4. The Analytics element includes attributes that define of implementation of analytics for Experience Optimization.
    Analytics attributesDescription
    implementationClassThe Java class that implements the analytics provider

    Value is a fully qualified class name, and defaults to com.tridion.smarttarget.analytics.GoogleAnalyticsManager. This is the implementation class for Google Analytics that ships with Experience Optimization.

    trackingRedirectUrlA relative URL to your website redirects folder

    Default: "/redirect/"

    timeoutMillisecondsThe time in milliseconds to wait to retrieve the Experiment from the analytics provider before timing out

    Default: 5000

  5. In the Analytics element, set the value of the trackingRedirectUrl attribute to relative URL to your website redirects folder, by default /redirect/.
  6. (Optional) If your Experiments are timing out, configure In the Analytics element with a higher value. The default is 5000 milliseconds. Set the value of the timeoutMilliseconds attribute to the time (in milliseconds) to wait to retrieve the Experiment from the analytics provider before timing out.
  7. Specify parameters for the analytics provider you specified in the implementationClass attribute. If you chose the default Google Analytics provider, set values for the following subelements:
    implementationClass subelementsDescription
    ServiceAccountEmailAddressEmail address of the service account that you created in the Google Developers Console
    PrivatekeyPathFull path and filename of the P12 key you created
    AccountIdID of the Google Analytics service account
    TrackingIdTracking ID of the Google Analytics service account
    ViewIdView ID of the view you created in Google Analytics
  8. If you use the default Google Analytics provider, in the CustomDimensions subsection, also specify the IDs of the custom dimensions you created in the subelements:
    CustomDimensions subelementsDescription
    ExperimentIdExperiment ID
    InstanceIdInstance ID
    PublicationIdPublication ID
    PageIdPage ID
    RegionIdRegion ID
    ComponentIdComponent ID
    ComponentTemplateIdComponent Template ID
    ChosenVariantChosen Variant
  9. In the <DefaultValues> section, set the value of <AllowDuplicates> to true if you want to allow Promotions that are already in the output of preceding regions on this Page to also be displayed in this page region.
  10. Set the value of the <Referrers> element to the file name of your referrers file, typically smarttarget.referrers.xml.
  11. In the <AmbientData> section, in the <Prefixes> subsection, map the URI of Claims to a unique prefix using the format <ClaimURI>prefix</ClaimURI> where:
    • <ClaimURI> is the URI up to the last subpart of the string separated by underscores: the pattern that matches the prefix to the URI of a resource matches everything but the last term in the URI string.
    • prefix is the prefix value used instead of the full Claim URI: when you define Trigger Types, you specify the url-param attribute, which consists of the Claim URI prefix and the last subpart of the URI string.
    <AmbientData>
      <Prefixes>
         <taf_claim_audiencemanager_contact>am</taf_claim_audiencemanager_contact>
         <taf_claim_audiencemanager_contact_extendeddetail>am_ex</taf_claim_audiencemanager_contact_extendeddetail>
         <taf_claim_ambientdata_sessioncartridge>sc</taf_claim_ambientdata_sessioncartridge>
         <taf_claim_ambientdata_sessioncartridge_session>sc_session</taf_claim_ambientdata_sessioncartridge_session>
         <taf_claim_ambientdata_sessioncartridge_useragent>sc_ua</taf_claim_ambientdata_sessioncartridge_useragent>
         <taf_claim_ambientdata_sessioncartridge_useragent_browser>sc_ua_browser</taf_claim_ambientdata_sessioncartridge_useragent_browser>
         <taf_claim_ambientdata_sessioncartridge_useragent_os>sc_ua_os</taf_claim_ambientdata_sessioncartridge_useragent_os>
         <taf_claim_ambientdata_sessioncartridge_authorization>sc_auth</taf_claim_ambientdata_sessioncartridge_authorization>
      </Prefixes>
    </AmbientData>
    Example
    In Audience Manager, for example, where a full Claim URI for a Contact extended detail such as Age is:
    taf_claim_audiencemanager_contact_extendeddetail_age
    in the Claim Store, the Claim Prefix am_ex is mapped to the generic part of the URI taf_claim_audiencemanager_contact_extendeddetail so that you just need to add the specific field to the Claim prefix, in this case am_ex_age, to address that field.
    Default prefixes for Audience Manager
    The following default prefixes are configured in the smarttarget_conf.xml file for Claim URIs inserted by the Audience Manager cartridge:
    <taf_claim_audiencemanager_contact>am
    Maps to Claim URIs containing a Contact's regular details, for example BounceStatus.
    <taf_claim_audiencemanager_contact_extendeddetail>am_ex
    Maps to Claim URIs containing a Contact's Extended Details, for example name.
    Default prefixes for session data
    The following default prefixes are configured in the smarttarget_conf.xml file for Claim URIs inserted by the Session cartridge:
    <taf_claim_ambientdata_sessioncartridge>sc
    Maps the generic part of Claim URIs inserted by a Session cartridge to a prefix.
    <taf_claim_ambientdata_sessioncartridge_session>sc_session
    Maps to a Claim URI containing the value of the session length (the maximum duration of the user session specified in minutes).
    <taf_claim_ambientdata_sessioncartridge_useragent>sc_ua
    Maps to the following Claim URIs.
    • The visitor browser used when making the HTTP request.
    • The visitor search engine (whether the client application making the request is a web robot).
    • The visitor operating system used by the client application making the HTTP request.
    <taf_claim_ambientdata_sessioncartridge_useragent_browser>sc_ua_browser
    Maps to a Claim URI containing the value of the web browser that was used when making the HTTP request.
    <taf_claim_ambientdata_sessioncartridge_useragent_os>sc_ua_os
    Maps to a Claim URI containing the value of the operating system used by the client application making the HTTP request.
    <taf_claim_ambientdata_sessioncartridge_authorization>sc_auth
    Maps to the following Claim URIs:
    • Whether the user has been authenticated (they are who they claim to be).
    • The authorization mechanism used for communication.
  12. To allow other applications to use Experience Optimization data (Promotion, Page Regions and content items), within the <AmbientData> section, set the value of <AddSmartTargetDataToClaimStore> to true. Doing so adds such data to the Ambient Data Framework Claim Store for other applications to retrieve.
  13. Leave all other elements and attributes set to their default values.
  14. Save and close smarttarget_conf.xml.