You know it's possible to add content to your Datatrics project. You may however be asking yourself if there are ways to structure this content. This is where categories can be a solution. Adding categories allows you to not only filter content very easily. It also makes it possible to filter on pagetype: category in touchpoints. Besides these points they give you the option to only display items of a certain category on the corresponding category page and have content cross-reference each other to make Cross/Up-Selling easier.
So, how do you add categories to your content?
1. Creating categories for category pages
We recommend adding categories (for pages) through the custom importer. This can either be done using a comma separated CSV or XML format. Need more information about the custom importer? Check out this article.
The above screenshot is an example of an import for category pages using the CSV format. As you can see, we have added a "Categoryid" value to the file, the name of the categorypage and the url.
you can map these in the custom importer by choosing for categories, and using item. for the mapping of the fields.
If you want to add a dynamic feed instead, it is recommended to use the XML format.
The format required to import categories using XML can be seen below.
2. Assigning categories to content
After categories have been set-up, we need to assign categories to content. We can do this using by adding below format to the content feed in the following format for every item, you can decide the amount of categories assigned to the item:
By filling in a matching category_id and category_url, items with matching values, will be assigned to the category. Below is an example of an import, matching on the above category pages:
As you can see, this content item has been assigned to 2 categories. This has been achieved by assigning the following values:
CategoryID - mandotory
URL - recommended
Name - recommended
You can check if the import for category pages went correct with the API-calls described below (it can take up to an hour for categories to be available with these calls, you can just open them in your browser):
Call for all categories:
Call for a single category page: