Define Proxy Services
For security reasons, Content Studio should not communicate with the cXense services directly, but via Content Engine proxy services. For a full description of how to configure a Content Engine proxy service, see Defining a Proxy Service.
You need to set up two proxy services to access the CXense tagging and analytics services.
The serviceMapping
definitions for these proxy
services should be:
serviceMapping.cxense-tagging-url=https://api.cxense.com/processing/linguistics/execute?persisted=tagging-id serviceMapping.cxense-analytics-url=https://api.cxense.com/traffic/event?persisted=analytics-id
where tagging-id and analytics-id are the IDs of cXense persisted API URLs. In order to create these URLs you need to have set up a cXense account. Once you have a cXense account you can use the cXense API to create the persisted API URLs you need, and get their IDs
For general information on how to get started using the cXense API, see API authentication. If you use the Python command line tool described in that introduction, then you can create the required URLs with the following commands:
- Tagging id
-
Enter the following command:
python cx.py /persisted/create \ '{"path":"/processing/linguistics/execute", "request":{}, "mutable":{"document":true, "documentId":true}}'
The response will look something like this:
{ "id": "4b47ecceb282ede72d0d4087d06dd9d135b375ab" }
The long string is the tagging-id you need to include in your service mapping definition.
- Analytics id
-
Enter the following command:
python cx.py /persisted/create \ '{"path":"/traffic/event","request": {"siteId":"9222310557536506915", "start":-3600, "groups":["url"], "historyFields":["events","sessionStarts"], "historyBuckets":60, "fields":["uniqueUsers", "activeTime", "sessionStarts", "sessionStops"]}
The response will look something like this:
{ "id": "a50ed5026291b67fc31e82164134633c005c8def" }
The long string is the analytics-id you need to include in your service mapping definition.