You will typically measure on the backside of the gate, where you will attach the brace to the supporting members or framework of the gate. Typically you will measure from about 3-6” from the corner of the strongest horizontal or vertical member you intend to attach to.  Most often the pickets are vertical, so your strongest and most often attached to member will be the top and bottom horizontal 2x4 or 2x3. You do not need to measure from the exact corner to corner.  You will not want to attach at the very corner as you may split your wood.  You will or can come a few inches or more away from the outermost corners.  Or if there are hinges or other obstructions like a latch in the way, you can move the point you need to attach to a clear spot.  You need to leave enough angle for the brace to still work at adjusting the gate.