0

I am working to add a bunch of Web Collect javascript to our website (not a cloud page). I'm stuck on the Collect the observations of identified visitors part and particularly by the following statement.

Replace "INSERT_EMAIL_OR_UNIQUE_ID" with the dynamic code to get the customer ID. A customer ID is typically an email address or custom number unique to that customer

Question is, what dynamic code should be inserted? My instinct says the AMPscript for email address at this is our subscriber key? But I haven't seen any examples confirming this. If this is the case, will the person only be identified if they click on an email or ad sent by SFMC directly and ignore organic visitors?

Here is the code:

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

This is the help documentation:

https://help.salesforce.com/articleView?id=mc_ctc_set_user_info.htm&type=5

Any assistance greatly appreciated.

0

I was asked the very same question yesterday by a client, so you're not the first to be confused by this.

For the collect tags, anywhere you see the capital's e.g. "INSERT_EMAIL_OR_UNIQUE_ID" you will need to add the value as you retrieve it from the scripted value of your website/database. For example, if you want to identify the web visitor using "email" : "INSERT_EMAIL_OR_UNIQUE_ID" then you need to retrieve the unique_id from your own database/website session i.e. when a user logs into your website, they will authenticate with a username/password and your website should be able to retrieve some values about the customer. You would script the Webcoll CT tags with these values so it might look like this :

"email" : "a2132f-f43df-8947f-673gh"

Where that guid is what I retrieve as the website from when the customer has logged in.

The same applies for search or browse etc. Any values you can pass into the collect tag will get sent to Marketing Cloud.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.