Documentation Center

Setting up Google Analytics

Google Analytics is a Google service that generates detailed statistics about a Web site's traffic and sources and measures conversions and sales. To track Experiments running in your Web sites, you need to set up a Google Analytics account and create a development Project.

Procedure

  1. Go to the Google Analytics Web site: http://www.google.com/analytics/.
  2. Log in using your Google Account.
  3. Click Admin in the menu bar.
  4. In the Account column, click Create new account and enter your account details.

  5. Click Get Tracking ID.

    The Tracking ID is created. You will need to specify the Tracking ID in the TrackingId element in the smarttarget_conf.xml file.

  6. In the Account Settings, get the Account ID and specify it in the AccountId element in the smarttarget_conf.xml file.
  7. In the View column, select Create new view.
  8. In the New Reporting View screen:
    1. Select Website.
    2. Enter Reporting View Name, for example My_ID.
    3. Select Reporting Time Zone.
    4. Click Create View.
    The View is created. You will need to specify the View ID in the ViewId element in the smarttarget_conf.xml file.
  9. In the Property column, open Custom Definitions > Custom Dimensions.
  10. Click NEW CUSTOM DIMENSION and add the following dimensions:
    Custom Dimension NameIndexScope
    ExperimentId1Hit
    InstanceId2Hit
    PublicationId3Hit
    PageId4Hit
    Region5Hit
    ComponentId6Hit
    ComponentTemplateId7Hit
    ChosenVariant8Hit
    You will need to specify these Custom Dimensions in the <CustomDimensions> element in the smarttarget_conf.xml file.
  11. Switch to Google Console Developer https://console.developers.google.com and create a Project.
  12. Enter a PROJECT NAME and PROJECT ID and click Create.
  13. Click Enable an API.
  14. Find and enable the Analytics API in the list of APIs.
  15. In Credentials, click Create new Client ID.
    1. Select Service Account.
    2. Click Create Client ID.
    3. Delete the JSON key which is generated.
    4. Click Generate new P12 key
      The key is downloaded. You will need to copy the key to the machines where your install the Google Analytics Provider (and specify the location in the PrivatekeyPath element in the smarttarget_conf.xml file).
    5. Copy the Service Account EMAIL ADDRESS to your clipboard.
    6. Return to the Google Analytics Web site and navigate to Admin > View > User Management and add this email address granting all rights.
    You will need to specify the EMAIL ADDRESS in the ServiceAccountEmailAddress element in the smarttarget_conf.xml file.