Retrieve SkyGlue User IDs

1. Retrieve user Ids by cookie values

SkyGlue uses two separate cookies to store the anonymous user ID and registered user ID. The two cookies are “__sgaid” (anoynmous user Id) and “__sgrid” (registered user Id).

If you set your own user ID using SkyGlue visitor tracking API, the IDs are stored in these cookies.

By default, if SkyGlue uses the default GA anonymous user ID, the __sgaid cookie is not created. If the visitor does not have a registered user ID, the __sgrid cookie is not created. This can help minimize the cookies used in your website. If you need SkyGlue to set these cookie values in your website, you can contact us.

The following sample JavaScript code demonstrates how to retrieve SkyGlue visitor IDs using JavaScript.

You can use similar approach to read the cookie using any programing lanaguage if you want to get SkyGlue visitor IDs on the server side.

2. Retrieve user Ids in form submission

You can get SkyGlue user Ids in form submission. The detail is available here: Collect SkyGlue user ID in form submission