Configuring Analytics

The <Analytics> element in the smarttarget_conf.xml configuration file specifies configuration settings relating to Google Analytics and your Google developer account.

Procedure

  1. Open the smarttarget_conf.xml configuration file:
    • In a Java Web application, the file is located in the classes subdirectory of your Web application.
    • In a .NET Web application, the file is located in the config subdirectory of your Web application.
  2. In the <SmartTarget><Analytics> section of the smarttarget_conf.xml configuration file, enter:
    <Analytics implementationClass="com.tridion.smarttarget.analytics.google.GoogleAnalyticsManager" timeoutMilliseconds="5000">
          <ServiceAccountEmailAddress></ServiceAccountEmailAddress>
          <PrivatekeyPath>C:/temps/My Project RS-8235a2fedac7.p12</PrivatekeyPath>
          <AccountId>12345678</AccountId>
          <TrackingId>UA-12345678-1</TrackingId>
          <ViewId>12345678</ProfileId>
          <CustomDimensions>
               <ExperimentId>dimension1</ExperimentId>
               <PublicationTargetId>dimension2</PublicationTargetId>
               <PublicationId>dimension3</PublicationId>
               <PageId>dimension4</PageId>
               <Region>dimension5</Region>
               <ComponentId>dimension6</ComponentId>
               <ComponentTemplateId>dimension7</ComponentTemplateId>
               <ChosenVariant>dimension8</ChosenVariant>
          </CustomDimensions>
     </Analytics>
    The <Analytics> element has the following properties:
    PropertyDescription
    implementationClassThe class that implements the analytics provider.
    trackingRedirectUrlA relative URL to your Web site redirects folder, by default "/redirect/".
    timeoutMillisecondsThe time in milliseconds to wait to retrieve the Experiment from the analytics provider before timing out.
    The <Analytics> element has the following child elements:
    ServiceAccountEmailAddress
    The email account created when you created a Project in the Google Console Developer.
    PrivatekeyPath
    The path to the location of the P12 key generated when you created a Project in the Google Console Developer.
    AccountId
    The Account ID created when you set up Google Analytics.
    TrackingId
    The Tracking ID created when you set up Google Analytics.
    ViewId
    The View ID created when you set up Google Analytics.
    CustomDimensions
    The custom dimensions created when you set up Google Analytics to bring Content Manager data into the platform:
    ElementValue
    ExperimentIddimension1
    PublicationTargetIddimension2
    PublicationIddimension3
    PageIddimension4
    Regiondimension5
    ComponentIddimension6
    ComponentTemplateIddimension7
    ChosenVariantdimension8
  3. Save and close smarttarget_conf.xml.