Analytics with TYK CE

I’ve the following configurations in my tyk.conf:

"enable_analytics": true,
  "analytics_config": {
    "type": "csv",
    "csv_dir": "/opt/tyk-gateway/analytics",
    "mongo_url": "",
    "mongo_db_name": "",
    "mongo_collection": "",
    "purge_delay": 1,
    "ignored_ips": []

I tried to call my api several times, but no analytics data I can find in /opt/tyk-gateway/analytics. How is it?

You need to use Tyk Pump to get the data out of redis and into a data sink.

More info in the repo:

If you want the latest data sinks, get the nightly build.

So does csv_dir": "/opt/tyk-gateway/analytics do nothing?

Purging analytics has been removed from tyk core in favour of using the tyk pump to direct data lows - it improves performance and throuput by not having to handle these operations periodically across a cluster.