When you already have demographic data (e.g., gender, age) or user contact details (e.g., email, phone) from your site’s registration process, you can send that information to Loop through the JavaScript tag. Doing so allows Loop to recognize and segment your users more precisely.
This article explains how to implement the JS snippet, the recommended data formats, and why you should avoid sending raw personally identifiable information (PII) whenever possible.
Important requirement:
Before sending any demographic or contact data, ensure the Loop tag is already installed. Without the base tag, the methods described below won’t function properly.
Basic Demographic Data
You can send demographic attributes like gender and age. Use whichever attributes you have regarding age or birth date—Loop needs only one to record the user’s age details.
Data Type | Key | Acceptable Values | Example |
Gender |
|
|
|
Age |
| Numeric (current user age) |
|
Birth Year |
| 4‑digit year of birth |
|
Full Birthday |
|
|
|
Code Example
<script>
_rely.push({ 'gender': 'F', 'age': 29 });
_rely.send();
</script>
Contact Data (Emails, Phones, National IDs)
Loop strongly discourages sending unencrypted user emails, phone numbers, or national IDs. If possible, hash these values on your end before sending. The platform will store them in a secure, non-reversible hash (SHA‑256 and SHA‑512). Sending data already in a hashed format minimizes privacy risks and aligns better with data protection regulations.
Supported Keys and Formats
Data Type | Raw Key ( | SHA‑256 Key ( | SHA‑512 Key ( | Format Requirements |
|
|
| Lowercase email (e.g., | |
Mobile Phone |
|
|
| Numeric only: country code + area code (no zeros) + number. E.g., |
National ID |
|
|
| Numeric only, no spaces or special characters. |
Code Example
<script>
// If sending hashed email
_rely.push({ 'ml_sh2':
'0e06ca8fb7433001b38b189ad677e591f44a934e50c771112179df4c93f53ad5',
'ml_sh5': 'c9302ce11aaf5a813296b7576fec7fb13256a2ee08b9d2fd194979a556f7a4dc8fee4010...' });
_rely.send();
</script>
You can also send data in multiple pushes if needed:
<script>
_rely.push({'gender': 'F'});
_rely.push({'age': 29});
_rely.push({'ml_sh2': 'hashed_email_here'});
_rely.send();
</script>
Practical Example
Suppose you have a registration form where users provide their age and email address. After hashing the email on your server, you can pass it to Loop like so:
<script>
_rely.push({ 'age': 29,
'ml_sh2': '7356faca65115f00dc32fa56d72f620acc7238581f546b24317123f5339332cf'});
_rely.send();
</script>
This ensures Loop can segment and recognize these users by their demographics and contact info while keeping their sensitive data protected.
Final Tips
Avoid Sending Plain Personal Information: Hash emails, phone numbers, and national IDs whenever possible.
One or Multiple Pushes: You can push multiple attributes at once or in several steps before calling
_rely.send()
.Check Your Formats: Make sure raw or hashed data matches the formats listed above (e.g., phone number has no extra characters).
By combining demographic details and hashed contact data, you can enrich your user segmentation without compromising personal information security.