I had ABS/ESP lights coming on intermittantly. Sometimes it would only be the ESP light, sometimes both. They would turn off when the car was restarted. I had friends vag com the car for me numerous times since I don't own a vag com myself. It would never log a DTC so I had no idea what was going on. After months and months, it finally logged a G251 Longitudinal acceleration sensor implausible signal.
So I went to the local dealer, had them look up the part and purchased a new one. I read conflicting posts about the location of the longitudinal sensor versus the latitudinal sensor. I pulled the glove box looked at the sensor there and the part number didn't match so I pulled the lower dash on the driver's side, and the sensor matched so I replaced it thinking it was the longitudinal acceleration sensor.
The car seemed a little better for a few days. Then the ABS/ESP lights came on again. From then on, they would only both light up. I had the codes read many more times and a dtc would never be recorded so I couldn't figure out what it was. Recently I was able to borrow a friends PDA with the shadetree software and cable and kept it in the car for a few days. Fortunately, the problem had been occuring almost every time I drove the car now. When the lights would come on, I'd stop and vag the car and consistantly pulled the same code as before for the longitudinal sensor.
Thinking I got a bad sensor from the dealership, I went to pull it out so I could take it and excange it hopefully under warranty. So I remove the driver's side dash and remove the sensor. As I was removing it, I noticed there were little directional arrows on top indicating (+) and (-). I also noticed the mounted orientation of the sensor pointed these arrows towards the sides of the car instead of front to back. So out of curiosity, I popped off the side dash panel on the passenger side and pulled the sensor out from that side. Sure enough, it was mounted with the arrows pointed front and back. I also noticed that there were 2 part numbers on it. 1j0907651a and 1j1907638b. One on the side I looked at when I first replaced the other sensor which didn't match, then another on the other side which I hadn't looked at, which did match. They are in fact the same part number, same sensor. I don't know why they labeled it with two different ones. So this was actually the longitudinal sensor.
To verify, they were the same, and this one was the one going out, I swapped the sensors, buttoned everything back up, and went for a road test. This time, only the ESP light came on and lo and behold, I threw the G200 lateral acceleration sensor code. So I went back home, switched them back and left the longitudinal sensor out for replacement. Since it can be accessed by the side panel instead of removing the dash, this is the easiest location to replace. Had the other sensor been faulty, I would have left them swapped. So I got a new one, this one only had one part number on it - 1j0907651a - and swapped it in over lunch today. No codes, no lights and my ABS seems to be working properly (before it would start engaging early and inappropriately).
So, in summation, the lateral and longitudinal sensors are the same p/n 1j0907651a, at least in my car and probably most of the earlier ones. I've read they are combined in later models, but have no knowledge of that. If the ESP light stays on with no codes, its most likely the lat sensor, if the ESP and ABS lights come on without logging codes, its most likely the long sensor. Hopefully my trial and error can be helpful to others.