The circuit from the video in the above YouTube link shows how to use the RPi to turn the motor on or off.  To detect whether or not the motor is running, the circuit needs to be modified (see the schematic/diagram below).  You won't be using the "here > > > > > >" part of the yellow wire (as seen in your question) because that would be measuring current through a series connection which the RPi can't handle.  Instead you would measure the potential difference (voltage) across a parallel connection.  This is what the GPIO (configured as an input) will measure: a HIGH potential or a LOW one.

Make sure the barrel style DC plug has a positive center.  The 33K resistor, which has one end going to the transistor base, will have its other end connected to the green wire in your circuit. This way, when the motor comes on, some current will drive the transistor, allowing current to flow through the opto-coupler's internal LED.  It then shines on the receiver, allowing the isolated collector-emitter junction to conduct.



   A 10K current limiting resistor connects the 3.3V pin to the GPIO you wish to use to detect if the motor is running. The 10K hardly drops any voltage because the GPIO's input impedance is far greater, so the GPIO sees nearly the entire voltage coming from the 3.3V pin.  This ensures that the input always reads a stable HIGH since the voltage must drop quite a bit before the transition from HIGH to LOW. Grounding the GPIO, as it is presently wired, will pull it down to ground (LOW) while drawing less than 1mA through the 10K resistor (thus protecting the RPi).  When opto-coupler conducts, it is connecting the ground and GPIO wires on its terminals.  This is how the RPi is able to detect the state of the motor.
[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/a1AiT.png