---
schema_version: "1"
id: 97ae82dd704ed337a1e5c4319e293871970ff47406f18868842e835f48d64274
title: Set User Information and Attributes in Collect Tracking Code
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mc_ctc_set_user_info.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_set_user_info.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b3a29566e55d653424d1fcca539a972084dbc39a03f1b7ba8bd55138d3a8d5f7
description: To maintain user details and subscriber information in a contact profile, use the Collect Tracking Code feature in Marketing Cloud Engagement.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Set User Information and Attributes in Collect Tracking Code

To maintain user details and subscriber information in a contact profile, use the Collect Tracking Code feature in Marketing Cloud Engagement.

The setUserInfo push passes the Contact ID. Regardless of the type of ID chosen, use the email label for this field and add the value in the SetUserInfo snippet. You don’t need to add it to every page because adding it once ties the known identifier to the Collect Tracking Code cookie.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/images/icon_tip.png)

Tip Configure Collect Tracking Code to store subscriber information when a contact enters an email address on the website or clicks through a marketing email. To use the [Personalization Builder Integrations](https://help.salesforce.com/s/articleView?id=mktg.mc_pb_integration_with_contact_builder.htm&release=264.0.0&type=5 "Einstein Recommendations passes raw data gathered via the Collect Tracking Code into Contact Builder. The data is organized in up to eight data extensions that enable you to search and filter information. Data is available to all tools that integrate with Contact Builder."), you must use the user’s email address. For privacy reasons, avoid using a personally identifiable information (PII) identifier or hashing the email.

**Set User Info**

```
<script type="text/javascript">       
    _etmc.push(["setOrgId", "MID"]);
    _etmc.push(["setUserInfo", {
        "email": "INSERT_EMAIL_OR_UNIQUE_ID"
    }]);
    _etmc.push(["trackPageView"]);
</script>
```

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mc_data_management_and_analytics-264-0-0-production-enus/7988f60d-cd94-4b42-8836-dc11773564b5/images/icon_tip.png)

Tip Add this call everywhere that a user logs in or becomes known, such as login pages and sign-up pages.

1. Copy and customize the script by replacing `INSERT_EMAIL_OR_UNIQUE_ID` with dynamic code to get the Subscriber ID. A Subscriber ID is typically an email address or number unique to that user.
2. Add the modified script in the header code on your pages.

#### See Also

- [Install Collect Tracking Code](https://help.salesforce.com/s/articleView?id=mktg.mc_ctc_install_collect_code.htm&release=264.0.0&type=5 "Learn how to configure your site to use Collect Tracking Code.")