Set Contact Attribute Affinity

Use Collect Tracking Code to build subscriber affinity models based on contact attributes.

Match a contact attribute to a tagged catalog field to increase the subscriber's affinity for the value of that contact attribute. The amount of increase is less than what results from a purchase but more than the increase from a view.

<script type="text/javascript">       
    _etmc.push(["setOrgId", "MID"]);
    _etmc.push(["setUserInfo", {
        "email": "INSERT_EMAIL_OR_UNIQUE_ID",
        "details": {
            "gender: "female"
        }
    }]);
    _etmc.push(["trackPageView"]);	 
</script>
  1. Copy the script and replace gender with the contact attribute you want to match.
  2. Add the modified script in the header code on the detail pages of your website.
Example
Example

Lisa’s marketing director wants to increase the user affinity for catalog items where the gender field value is female for customers who identify as female. Lisa uses the Set Contact Attribute Affinity code to permanently boost any item that has the value female in the gender field.

User Affinity Tag Scenario

Configure a tag scenario to return the most popular items with a particular catalog attribute value. Set the recommendation engine to return items with attribute values that match the top affinities of a contact. This feature can power recommendations like Brands You Love or Items in your Favorite Colors.

  1. Highlight the catalog attribute to use.
  2. Select Same as User Affinity as the value.
Example
Example

Lisa’s marketing director wants to increase the user affinity for catalog items where the gender field value is female for customers who identify as female. Lisa uses the Set Contact Attribute Affinity code to permanently boost any item that has the value female in the gender field.

The SetUserInfo call can also include customer attributes specific to the contact on the site. The label can be any value and pulls into the Contact Profile exactly as passed. The value for each pair overwrites any value that is on the profile for the active user.

To use the affinity seeding functionality, the label must match the field in the catalog and the value passed must be assigned to a product on the catalog.

Customer Attributes cannot be exported and currently do not get passed into Marketing Cloud data extensions. The primary use cases for these values are to seed Contact Attribute Affinity and to use these values in rules in influence recommendations. For example, a financial institution adds AgeGroup as Minor for some users, and then creates a rule that prohibits the recommendation engine from recommending items whereOfferType=CreditCard when AgeGroup = Minor.