Category Definition File
To define the category structure and display names for category IDs that you send through tags, you must use a Category Definition File (CDF).
The Category Definition File maps every category ID sent in tags to a display name and a parent category. The file should be uploaded to Digital Analytics through the https://import.coremetrics.com Import GUI, or the SFTP account that is configured and managed through the GUI.
Category Definition File Format
- Client ID
- Category ID
- Category Name
- Parent Category ID.
Column | Description |
---|---|
Client ID | Digital Analytics assigned ID. This value should be the same for all rows within a given file. |
Category ID | Category ID for the category being defined. This value should match the values being sent in the Digital Analytics tags or referenced in the Parent Category ID column of the CDF. |
Category Name | The display name that should be used for this category ID in reporting. |
Parent Category ID | The Category ID of this category's parent category. For top-level categories, this column should be empty. |
The Digital Analytics TagBar can be used to identify what category ID is being sent in a tag. The Category ID (cg) field displayed in the TagBar output should match a Category ID in the second column of the CDF for that Client ID.
Invalid characters
Single quotation marks (') and double quotation marks (") are automatically removed from collected tag Category ID parameter values. Thus, no tag data can be assigned to Category IDs that contain quotation marks. However, single and double quotation marks can be included in Category Name column values for report display purposes. Following is an example:
99999999,204,DRILL BITS 1/4" TITANIUM,202
Commas (,) found in Category ID or Parent Category ID column values are replaced with spaces (" ") during loading of the category records. This ensures that tags sent with Category ID (cg) parameter values including commas will match the loaded Category Definition File record (see 2.5 Data Tags for more information on removal of commas from tag parameter data).
Multibyte CDF characters
Only single byte data should be included in the CDF supporting a single byte-enabled Client ID. Single byte-enabled Client IDs cannot include categories with multibyte characters; such categories will not be available in reporting.
CDF column data (Category ID, Name and Parent) for multibyte-enabled Client IDs can include multibyte characters.
Example of Category Definition File
The following example shows the category structure with corresponding records.
Category ID, Category Name, and Parent Category columns (2-4) values can be in uppercase, lowercase, or mixed case for character sets having multiple case values. All CDF column values are converted to uppercase upon import to Digital Analytics (import.coremetrics.com or ftp.coremetrics.com). All collected tag Category ID values are also converted to uppercase after receipt of the tag by Digital Analytics, so the Category ID values in columns 2 and 4 of the CDF will always match the same Category ID value collected in tag data.
Client ID | Category ID | Category Name | Parent Category ID |
---|---|---|---|
99999999 | 101 | MENS | |
99999999 | 201 | WOMENS | |
99999999 | 301 | SALE | |
99999999 | 102 | MENS SHIRTS | 101 |
99999999 | 103 | MENS PANTS | 101 |
99999999 | 104 | MENS SHIRTS: DRESS | 102 |
99999999 | 105 | MENS SHIRTS: TEE | 102 |
99999999 | 202 | WOMENS SHIRTS | 201 |
99999999 | 203 | WOMENS PANTS | 201 |
99999999 | 204 | WOMENS SHIRTS: DRESS | 202 |
99999999 | 205 | WOMENS SHIRTS: TEE | 202 |
99999999 | 302 | SALE: SHIRTS | 301 |
99999999 | 303 | SALE: BRANDS | 301 |
99999999,101,MENS,
99999999,201,WOMENS,
99999999,301,SALE,
99999999,102,MENS SHIRTS,101
99999999,103,MENS PANTS,101
99999999,104,MENS SHIRTS: DRESS,102
99999999,105,MENS SHIRTS: TEE,102
99999999,202,WOMENS SHIRTS,201
99999999,203,WOMENS PANTS,201
99999999,204,WOMENS SHIRTS: DRESS,202
99999999,205,WOMENS SHIRTS: TEE,202
99999999,302,SALE: SHIRTS,301
99999999,303,SALE: BRANDS,301
Uploading the CDF
The CDF should be uploaded through the CDF import tool at https://import.coremetrics.com (US Data Center). This tool allows direct uploads of CDFs through the user interface, or creation of an sftp (port 998) server account with Digital Analytics (ftp.coremetrics.com - US Data Center) for scheduled upload of automatically generated CDFs.
Europe Data Center domains:
import.de.coremetrics.com
ftp.de.coremetrics.com
Files imported through the Import GUI or sent to ftp.coremetrics.com will be automatically imported and processed, and your categorization hierarchy in reporting is updated from that point forward. Changes from an uploaded file should be reflected in the next processing of the daily reports. The frequency at which the CDF is uploaded can be determined based on your own needs. If your hierarchies might change on a daily or weekly basis, Digital Analytics recommends setting up an automated script that will generate the CDF and upload it daily. This ensures that Digital Analytics picks up any changes in the hierarchy on a daily basis.
File Naming Convention
The CDF should be named according to the following convention:
CDF_<client_id>.csv
where <client_id> is your Digital Analytics assigned client ID.Multisite Analytics
Category Definition Files can be created and uploaded for both the Multisite Analytics Global ID (5xxx0000) and Site Alias/Sub-IDs (5xxxxxxx). CDFs for Multisite IDs follow the standard file naming and file formatting requirements, except that the column 1 'Client ID' and file name <client_id> values will be either the Multisite Global ID or one of the provisioned Site Alias/Sub-IDs.
Here is an example of a Multisite Analytics Global ID file name and its contents.
CDF_50010000.csv |
---|
50010000,101,MENS, |
50010000,201,WOMENS, |
50010000,301,SALE, |
Here is an example of a Multisite Analytics Site Alias/Sub-ID file name and its contents.
CDF_50010001.csv |
---|
50010001,101,MENS, |
50010001,201,WOMENS, |
50010001,301,SALE, |
Multisite Analytics CDFs are uploaded using the standard CDF Import tool at https://import.coremetrics.com.
Log on using the Multisite Global ID to upload the Global ID CDF and the Site Alias/Sub-ID to upload Sub-ID CDFs.