Matching your external user IDs with Loop allows you to later upload and segment data based on those IDs. This process is useful for businesses that have their own user identifiers and want to link them with Loop IDs for more precise audience targeting.
Prerequisite
Before implementing external ID syncing, contact your account manager to enable this process in your workspace.
How to Sync an External ID
To send an external user ID when the Looptag runs on a visitor’s device, you must include the following JavaScript snippet on your website:
Basic Implementation
<script>
_rely.push({'external_id': 'USER_ID_HERE'});
_rely.send();
</script>
Example
<script>
_rely.push({'external_id': 'EE6AA0D3-92EF-416D-ACBA-575F11EEC03E'}); _rely.send();
</script>
Key:
external_id
Value: A unique user identifier from your system
Once this ID is synced with Loop, you can later upload data and build segments using the same external ID, allowing for more customized segmentation.
Syncing with Google Analytics ID
If you want to sync Google Analytics user IDs with Loop, you can extract the _ga
cookie value and send it as an external ID.
Google Analytics ID Sync Implementation
<script> function getCookie(name) { var value = "; " + document.cookie; var parts = value.split("; " + name + "="); if (parts.length == 2)
return parts.pop().split(";").shift();
}
var analytics_id = getCookie("_ga"); if (analytics_id) { _rely.push({'external_id': analytics_id});
_rely.send();
}
</script>
How This Works
The script extracts the
_ga
cookie, which contains the Google Analytics client ID.If the
_ga
cookie is found, the script sends it as anexternal_id
to Loop.This allows you to later match Google Analytics data with Loop user segments.
By syncing external IDs, you gain greater control over your segmentation strategy, allowing you to upload, match, and activate audiences with precision. If you require this feature, reach out to your Retargetly account manager for activation.