Skip to main content

Cookie Sync – Retrieve Retargetly User ID (/getuid)

Learn how to perform a cookie sync when you will store the matching table

J
Written by Juan Sebastian Franco
Updated over a month ago

The /getuid endpoint allows you to retrieve the Retargetly user ID (_rlid) by redirecting the user to a URL of your choice, with the ID inserted as a query parameter. This is used when your platform wants to store the ID mapping instead of Retargetly.


When to Use This

Use this API if you will host the matching table, and you want to store Retargetly’s _rlid in your own systems.

No Retargetly tag is required beforehand, but you must provide a redirect URL that accepts the ID.


Endpoint

Region

Endpoint

America

https://api.retargetly.com/getuid

Europe

https://api-eu.retargetly.com/getuid


Query Parameters

Name

Description

Type

Required

p

Partner ID. Provided by Retargetly.

Integer

✅ Yes

redirect

The URL where the user will be redirected. Must contain %rlid% macro to be replaced with the actual user ID.

String

✅ Yes

✅ The redirect URL must be URL-encoded and include the %rlid% macro.


Example Request

https://api-eu.retargetly.com/getuid?p=123456&redirect=https%3A%2F%2Fdata.partner.com%2Fsync%3FuserId%3D%25rlid%25

After retrieving the ID and inputting it in the redirect URL, in this example case Retargetly would redirect the user to:

https://data.partner.com/sync?userId=abc123

Where abc123 is the Retargetly ID (_rlid) for that user.


Response

The endpoint returns a transparent 1x1 PNG.


Implementation Notes

  • You must obtain a p (Partner ID) from your Retargetly contact.

  • Always include %rlid% in the redirect URL, or the ID won’t be inserted.

  • Use the correct regional endpoint to meet privacy compliance.


Region Mapping

America: Argentina, Bolivia, Brazil, Canada, Chile, Colombia, Costa Rica, Dominican Republic, Ecuador, Guatemala, Honduras, Mexico, Nicaragua, Panama, Peru, Puerto Rico, Paraguay, El Salvador, USA, Uruguay, Venezuela.

Europe: Austria, Belgium, Czech Republic, Denmark, Finland, France, Germany, Hungary, Ireland, Italy, Luxembourg, Netherlands, Norway, Poland, Romania, Spain, Sweden, Switzerland, United Kingdom, Albania, Andorra, Armenia, Belarus, Bosnia and Herzegovina, Bulgaria, Croatia, Estonia, Georgia, Greece, Iceland, Kosovo, Latvia, Liechtenstein, Lithuania, Malta, Moldova, Monaco, Montenegro, North Macedonia, Portugal, Russia, San Marino, Serbia, Slovakia, Slovenia, Ukraine.


🔁 Related

👉 If you want Retargetly to store the match instead, learn here how to use /sync to send your platform's ID and match it with ours within our graph.

Did this answer your question?