Whose name will be written on every forehead in heaven?

God or the lamb

It's not clear in the text, but they'll see his face and have his name on their forehead.

There shall be no more curse: but the throne of God and of the Lamb shall be in it; and his servants shall serve him:

And they shall see his face; and his name shall be in their foreheads. Revelation 22:3-4