The Category Definition File (CDF) is used to define the category structure and display names for category IDs that you send through tags.
The Category Definition File maps every category ID sent in tags to a display name and parent category. The file should be upload to Digital Analytics through Import on the Tools menu (Import the Category Definition File) or the SFTP account that is configured and managed through the GUI. The CDF allows you to update the existing category hierarchy without modification of the tag implementation site code. Updated or rearranged category organization can be created in the reporting through modification of the CDF. This simplifies the management of the reporting hierarchy.
Category Definition File Format
The Category Definition File is a comma-separated values (CSV) file. Each line describes a category in the hierarchy. Each line has four values:
- Client ID
- Category ID
- Category Name
- Parent Category ID.
|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.|
Every category ID that is sent through the Digital Analytics tags on your site or referenced in the Parent Category ID column should have a matching line within the CDF that maps the ID to a display name and parent category. Category IDs that do not have a matching line within the CDF will be grouped into the "No Category Assigned" top-level category in reports.
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.
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.
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 (
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||104||MENS SHIRTS: DRESS||102|
|99999999||105||MENS SHIRTS: TEE||102|
|99999999||204||WOMENS SHIRTS: DRESS||202|
|99999999||205||WOMENS SHIRTS: TEE||202|
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 Tools > Import (Import the Category Definition File). 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:
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:
where <client_id> is your Digital Analytics assigned client ID.