The Scandinavian people took extreme measures to prevent these creatures from rising. Coffins were carried over the church wall rather than through the gate, and then carried three times around the church itself. This would supposedly stop the deceased from coming back from the dead. Any shovels used to dig the grave would be left undisturbed in a cross formation. A varp, or pile of rocks and twigs, was left where the person died. When a traveler passed the varp, it was important they throw another stone or twig on top to commemorate the death. Doing so would bring luck--not doing so risked certain misfortune.
Towards the beginning of the 20th century, the perception of gjenganger in Scandanavia has evolved. A modern version of spøkelse (ethereal ghosts who are non-violent in nature) seems to have taken over. Many varps have disappeared over time, though there are a few marked with a sign or something similar. However, the tradition of adding a stone or stick is kept alive to this day, even if in jest.
Interested in reading more on Scandinavian folklore? Check out Scandinavian Folk Belief and Legend (The Nordic Series) by Reimund Kvideland and Henning Sehmsdorf. Great book!