Inductive proximity sensor lj12a3-4-z/bx

So I want to use the lj12a3-4-z/bx inductive proximity sensor. It has 3 wires: Brown: V+, Blue: GND and Black: signal

Its operating voltage is 6VDC - 36VDC and thus I use a battery of 9VDC to power the sensor. But then I have no idea how to hook up the signal wire from the sensor to the arduino uno.

Is it digital or analog? To which pin should I connect it to? Or should I used the arduino itself to power the sensor instead of using a battery?

I've done some searching on the arduino forms, but so far I only found info about a two wire sensor.

Hi! I am using the same sensor, it can be read with analog or digital pin, I recommend analog to see what values you are receiving.
The blue wire must be connected to GROUND.
The brown wire must be connected to EXTERNAL SOURCE (6-12 V) /* I recommend 6V to protect the analog pin of Arduino, just check its limits */
The black wire is your signal, and must be connected to ANALOG PIN.