How to connect analog sensor to ADC port of the pixhawk Cube Black

Hi, everyone!

I need connect analog sensor (a potentiometer) and to receive position data.
How I do that? The link (How to connect the Potentiometer to pixhawk cube black) try to explain but isn’t very clear. Could someone explain?

Data will look like:

data_alpha

I appreciate any help!