Saint-Louis is a city in northern Senegal it is situated along the atlantic coast and close to the border to Mauritania. Since the historical city center is situated on a tiny island, connected only with a small bridge, this part of the city is quite calm, which makes it quite special for West Africa.
Because many Europeans come down to Senegal in camping cars, it may be possible to find a ride north by asking around at campgrounds like "Zebrabar" at Langue de Barbarie.
South towards Louga, Dakar
Coming from the colonial old town, cross the bridge to the city and take Bus #1 or #7 or a minibus (Transport en Commun) for 100 FCFA and get out at the gare routiere, which should be the last stop anyway. There, you will find yourself on the edge of the city, right next to the main road towards Dakar. If you follow the road for a few hundred metres, you will cross a bridge, after which you will find it easy to hitchhike without anyone bothering you. There is also a gas station before you cross the bridge and it's also possible to find a ride there by talking to drivers.
You should be fine if your ride goes only until Louga it's quite easy to hitch on from there. Just stay where the road forks off into the city and continue in direction towards Dakar. Touba is possible aswell.