I of course would never use generic parts to professional fix MB cars.
BUT, if I were doing it, I would remove the Bosch sensor, cut the last 5inches with the connector from both the old and new sensors and I would then, on the bench solder and heat shrink all the connections such that the new sensor then has the old connector.
Then just install as one would the proper new part.
Bosch Master, ASE Master, L1
33 years MB technician