I am trying to use Salesforce predictive web to display page recommendations for specific users. I am reporting the user data as such:

<script src="https://{}.collect.igodigital.com/collect.js"></script>
    _etmc.push(["setOrgId", {}]);
    _etmc.push(["setUserInfo", {
        "id": "{}",
        "email": "{}"

I am using {} as a placeholder here for specific info. This appears to be working, because I can view my profile and pages that I have viewed in Salesforce by looking up my own email address, so I don't think that is the issue. I am grabbing the data from salesforce using this url:


When I do this, I can get data for "Content Top Views" scenarios, but nothing else, no other scenarios. This makes sense, because I am not reporting my email address to Salesforce when making this request, so it would have no way of knowing which profile to pull up when it is grabbing the json data. I have tried


but it does not work either. Does anyone know how to format this request so that salesforce returns user-specific recommendations that can be used for other scenario types? Where is the documentation on this?


  • I am trying to do this using Salesforce Predictive Web, located on this page: https://mc.s7.exacttarget.com/cloud/#app/Predictive Web/web_rec_tools. If you go to https://mc.s7.exacttarget.com/cloud/ then go to Personalization Builder -> Predictive Web, that is where I am at.
  • In answer to the comment about whether or not am doing this in a Visual Force page, no, I am not. This site is created using Django and is hosted on my own server.
  • I have not found anything in help.salesforce.com yet, but I did find a bit of documentation here, help.marketingcloud.com/en/documentation/personalization_builder/predictive_web/, but it does not answer the question unfortunately.
  • I am assuming you are trying to do this in a visual force page (because of the script tags), but could you please specify? additionally, have you looked for information in the H&T portal? help.salesforce.com – glls May 5 '17 at 14:03

Trying to acheive the same thing and tried with


and it seems to be working and returning predictions as per the reporting tab.


A few things need to happen. The user's email (or a GUID, it doesn't necessarily have to be an email address, but we're calling it an email address for the sake of consistency) needs to be the same that you pass to collect.js as you use in recommend.js. However, simply collecting the user's data doesn't do much. You also need to track page views so as that user navigates your site, it builds their "profile" based on what they've viewed. The code you use to track specific pages will change. Right now, it has support for category pages, search pages (with the search query), page view for content or product pages, and other eCommerce options like purchase details and cart. You can also combine them if the keyword is the same since the value is an object, like for products or content that are specific to a category.

For example, you might have something like this on a content or product page:

<script src="https://{MID}.collect.igodigital.com/collect.js"></script>
    _etmc.push(["setOrgId", {MID}]);//Tracks to this MID
    _etmc.push(["setUserInfo", { "email": "{USER_EMAIL}" }]);//Tracks to this user
    _etmc.push(["trackPageView", {
        "item": "{CONTENT/PRODUCT_ID}",//Tracks that the user viewed this item
        "category" : "{CATEGORY}"//Tracks that the user viewed this category

Then in the bottom, you are retrieving data like this:


I'm assuming your catalogue is fine since you said you're getting data for non-personalized scenarios, so I won't include how to update your catalogue items. But once you are tracking both the user and their page views, you should start seeing personalized scenarios. The more they view and browse, the more data is collected and better the personalizations.

I hope this helps!

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.