we need more details like
- which device you are using.
- where you able to get reading from the sensor without the cayenne code. http://henrysbench.capnfatz.com/henrys-bench/arduino-current-measurements/the-acs712-current-sensor-with-an-arduino/
- was your device connected to cayenne.Adding a New Device using MQTT
then using cayenne for your project is very easy.