Hi GT
This is one of those...'lack of forethought' designs, imho they should have used two different multi-plugs for these two sensors even if they are both the same or a means of identifying the correct cable. Since both go to the ECU the only way of identifying which is which is by using a multi-tester across the pins in the ECU( wiring diagram needed), however since you won't do any harm getting this wrong, it will either start or not start you could just take pot luck and see if the car runs. Mind you when fitting a new engine as you are this isn't very helpful if there's an unknown fault. IIRC the sensor nearest the block is the speed sensor. What is important though is the gap between sensor and contact screws on the flywheel, this should be around 0.8mm. It's worth spending a little time here to get this right, an old sensor can help by gluing a 0.8mm spacer to it and setting the adjusting bracket for this depth and then replace with new sensor. You would need access to a lathe to turn up an accurate spacer and also a very strong glue designed for metal as the last thing you need is this dropping inside the bellhousing, I use something like loctite 648 for such things.
regards
Pete
edit:...I've just been reminded by my son that the original harness had ID tags on the loom...it's been a very long time since my car had Porsche wiring....
