0

I have implemented the following base collect code:

<script type="text/javascript" src="//MID.collect.igodigital.com/collect.js"></script>

<script>
  _etmc.push(["setOrgId", "MID"]);
  _etmc.push(["trackPageView"]);
</script>

However I don't have any idea about these code (how to implement/where to paste this code etc.):

Set User and Attributes:

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

Contact Attributes:

<script>
  _etmc.push(["setOrgId", "MID"]);
  _etmc.push(["setUserInfo", {
    "email": "INSERT_EMAIL_OR_UNIQUE_ID",
    "details": {
      "name": "INSERT_VALUE_HERE",
      "gender": "INSERT_VALUE_HERE",
      "email": "INSERT_VALUE_HERE",
      "location": "INSERT_VALUE_HERE",
      "phone": "INSERT_VALUE_HERE"
    }
  }]);
  _etmc.push(["trackPageView"]);
</script>

1 Answer 1

1

This code has to be implemented on your website and the mid value has to be the value that is your business unit id. The first two lines should be implemented on any page of your website.

When the user logs in or you know his unique identifier you should extend the line with setuserinfo and the email or unique Id of the user. Therefore for logged in users you would at least track these three lines.

The details do not have to be passed when you don’t have the attributes. I will edit this post tomorrow to give more insights.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .