according to Ben Gersom, this refers to the stocks, "it keeps all my ways", kept him within from going abroad about the business of life, and so may refer to the disease of his body, his boils and ulcers, which kept him at home, and suffered him not to stir out of doors; but the former sense is best:thou settest a print upon the heels of my feet; either it, the stocks, made a mark upon his heels, with which they were pressed hard, as Gersom; or rather God set one upon them, afflicting him very sorely and putting him to an excruciating pain, such as is felt by criminals when heavy blows are laid upon the soles of their feet, to which the allusion may be; or else the sense is, that he followed him closely by the heels, that whenever he took a step, it was immediately marked, and observed by the Lord, as if he trod in his steps, and set his own foot in the mark that was left.
"Calce tinxisti pedes meos", Gussetius, p. 550.