You should always place the GFCI as close as possible to the voltage source..........
Where and How to properly use a GFCI…
GFCIs only sense an imbalance on the load side of the circuit. If the imbalance or path to
ground occurs BEFORE the GFCI, then the sensing circuit will not release the relay stopping
the current. Because of this fact, you should always place the GFCI as close as possible
to the voltage source.
Ericson encourages the placement of any GFCI on a cordset to within 1 foot of the primary power plug.
This way, there is little cord exposed to damage and not being sensed by the GFCI.
OSHA and the NEC call for the use of GFCIs in all 125 volt 15,20 and 30 amp circuits. Consult your local safety codes for additional GFCI use regulations.