Skip Headers
Oracle® Fusion Middleware WebCenter Sites: Analytics Developer's Guide
11g Release 1 (11.1.1.6.0)

Part Number E39315-01
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

3 Exercise 2: Adding a New Parameter to the DetailDefinition Table

Custom parameters capture data on specific operations visitors perform on your website. This exercise shows you how to add a custom parameter to the DETAILDEFINITION table for data capture.

This exercise contains the following sections:

3.1 Overview

To create a report based on custom parameters, you must first create the parameters for which you wish to capture data, and then configure Analytics to process those parameters. In this exercise, you will be configuring Analytics to process the agent parameter (created in Chapter 2, "Exercise 1: Adding a New Parameter for Data Capture") by creating a database entry for the parameter in the DETAILDEFINITION table.

Any parameter defined in the DETAILDEFINITION table can be seen by Analytics which, in turn, makes the parameter available to the Analytics job that is created to process that parameter. You will be creating an Analytics job to process the agent parameter in the next exercise (Chapter 4, "Exercise 3: Developing a New Analytics Job").

3.2 Create a Database Entry for a Custom Parameter

For an Analytics job to process a custom parameter for display in your report, you will add a row (record) to the DETAILDEFINITION table in the Analytics database for the custom parameter on which you wish to capture data. In this exercise, you will add a row for the agent parameter (created in Chapter 2, "Exercise 1: Adding a New Parameter for Data Capture").

Since the DETAILDEFINITION table requires you to specify the type of parameter you are adding as an entry to it, you should have an understanding of the types of custom parameters Analytics supports.

Analytics supports the following types of custom parameters:

The agent parameter that you will be adding to the DETAILDEFINITION table is a session related parameter. The DETAILDEFINITION table's schema is shown in Table 3-1.

Table 3-1 The DETAILDEFINITION table

Column Name Data Type Description

Id

NUMBER (22)

The primary key, which is a unique number generated by the database for a custom parameter. This key is used to access the row for this parameter.

Name

VARCHAR2 (64 Bytes)

The name of the custom parameter.

Key

VARCHAR2 (64 Bytes)

The parameter name to be passed via the image tag, which is generally the same value as the Name parameter. This name is used in the tag to identify the value being passed.

Objecttypeid

NUMBER (22)

The object type identifier which is used by Analytics to track the number of different objecttypeid occurrences.

Siteid

NUMBER (22)

The siteid (foreign key from the site table) for which the parameter is configured. If you set the value to Null, the parameter is applicable for all registered sites.

Type

NUMBER (22)

Specifies the type of parameter.

Possible values: 0 for OI-related parameters and 1 for session- related parameters.

Groupfunction

VARCHAR2 (64 Bytes)

This field is used only for the L2_SESSIONDET table in the Analytics database. In this exercise, the value of this field is NULL.

Autodef

NUMBER (22)

This field is deprecated. In this exercise, the value of this field is NULL.


To store the data collected by the agent parameter, you will need to add the new record to the DETAILDEFINITION table. Execute the following SQL statement (replacing the sample Values with the values for the parameter you wish to insert into the table):

insert into DETAILDEFINITION (ID, NAME, KEY, OBBJECTTYPEID, SITEID, TYPE,
GROUPFUNCTION, AUTODEF) Values(249, 'mime', 'mime', NULL, NULL, 0, NULL, NULL);

Note:

The ID must be unique and must not conflict with any existing rows. SITEID must be the value for the site as registered in the Analytics database.

3.3 Next Steps

In Chapter 4, "Exercise 3: Developing a New Analytics Job" you will create a new Analytics job to process the raw data that is captured by the new agent parameter you added to the DETAILDEFINITION table in this exercise. The new Analytics job will process the agent parameter for display in a report ("NewBrowsers" report in this tutorial). The processed agent parameter will be displayed as a table column in the "NewBrowsers" report.

Before you develop a new Analytics job, keep in mind that:

In order for the new parameter to start capturing data for Analytics, the following components must be installed and running: