The UID field

The UID field is a unique identifier that can be used specifically to create SEO and user-friendly website URLs.

Before Reading

This page assumes that you have already retrieved a document from your Prismic repository and stored it in a variable named document.

Get the UID value

You can get the UID value of a document by accessing its uid property:

const uid = document.uid;

Vue Router: Reacting to params changes

If your component is retrieving content from the Prismic API based on one of the route params, make sure to take a look at our Reacting to params changes page.

To learn more about the UID field check out the user guide.