2

I am unsure if this question is 'outside the scope' of this forum, but I have nowhere else to turn to. We've gone back and forth with Salesforce support trying to solve this, but they're no help and we're still stumped.

We are trying to implement Einstein Email recommendations under personalization builder in the Marketing Cloud. We installed the dynamic javascript code in our website using google tag manager. When we try to upload the catalog using streaming updates it gives us an error. Support said it was because we had to link a website with a pipe delimited file, however we followed the documentation to the letter and did not find any sort of code for that (I'm in marketing not IT) or explanation as to how to add that. Anybody know how to do this?

I apologize again if this is outside the scope of this forum or if it's too much I'm asking for.

This is my code in the google tag manager for the streaming updates:

<script type="text/javascript">
      _etmc.push(["updateItem", 
         {
          "item": "ecommerce.detail.id",
          "name": "ecommerce.detail.name",
          "url": "ecommerce.detail.page_url",
          "item_type": "ecommerce.detail.category",
          "availability": "ecommerce.detail.availability",
          "regular_price": "ecommerce.detail.price",
          "image_url": "ecommerce.detail.image"
         }
      ]);
</script>

Here is the link to a product in our website where you can see the code installed.

Below are the errors that I'm getting in the console and the page source where you can see how these codes were installed:

Product Console

Page Source

Here are the docs I followed:

Stream Catalog Updates

Implementation Doc in MC

Personalization Builder Catalog Definitions

Thanks in advance!

UPDATE:

Payload from site:


    var dataLayer = [{
  "site": {
    "domain": "gaveteiro.com.br",
    "name": "Gaveteiro",
    "country": "BR",
    "application": "desktop"
  },
  "page": {
    "template": "Product"
  },
  "session": {
    "isLogged": false,
    "user": {
      "id": "0",
      "salesforceID": "0",
      "accountId": "0",
      "accountSalesforceID": "0"
    }
  },
  "ecommerce": {
    "detail": {
      "id": "0058000135",
      "name": "Macacao de Protecao Covertech 100 G - Volk",
      "price": "0.00",
      "original_price": "12.21",
      "variant": "unica",
      "brand": "VOLK",
      "category": "Vestimenta Descartável",
      "status": "Sob Encomenda",
      "status_id": "2",
      "image": "https://res-1.cloudinary.com/gaveteiro/image/upload/v1563216875/jxlbg6qqprxbh8hxhs5r.jpg",
      "page_url": "https://www.gaveteiro.com.br/macacao-de-protecao-covertech-100-g-volk/pg/LyB62W",
      "availability": "http://schema.org/OutOfStock"
    }
  },
  "remarketing": {
    "ecomm_pagetype": "product",
    "ecomm_prodid": "LyB62W",
    "ecomm_category": "Vestimenta Descartável",
    "ecomm_totalvalue": "12.21"
  },
  "event": "eventRemarketingDinamico"
}];

I believe this is it

UPDATE 2:

_etmc.push(["updateItem",{item_type:"ecommerce.category",item:"ecommerce.detail.id",name:"ecommerce.name",url:"Page URL",available:"ecommerce.status",sale_price:"ecommerce.id.price"}]);

This is what I could find, if this is not what you are looking for, I will talk to my IT dept tomorrow and get back to you. Thank you

6
  • can you provide the payload you are passing? you can can get this from dev console in your browser
    – EazyE
    Commented Jul 24, 2019 at 20:49
  • @EazyE is that what you needed?
    – Intern
    Commented Jul 24, 2019 at 21:24
  • I was looking for something more like nova.collect.igodigital.com/c2/xxxxxx/update_item?payload=[{"item_type":"product","item":"SU101Item1","name":"Streaming Update Test 101","url":"http:\\www.google3.com","unique_id":"SU101Item1","available":"N","ImageLink":"google.com"}]
    – EazyE
    Commented Jul 24, 2019 at 21:34
  • also availability should not be a URL it should be Y/N
    – EazyE
    Commented Jul 24, 2019 at 21:36
  • if i go to this url gaveteiro.com.br/macacao-de-protecao-covertech-100-g-volk/pg/… I don't see a streaming update call being made
    – EazyE
    Commented Jul 24, 2019 at 21:49

2 Answers 2

4
+25

Short answer is that the collect script is not getting loaded by the time you are making your _etmc.push() calls. You have the below code to add in the collect script as async, and then are immediately after making your _etmc.push() calls in a sync script block. I would suggest removing the async load from the below script, which should ensure it is loaded by the time you attempt to utilize it.

(function(){var a=document.createElement("script");
a.type="text/javascript";
a.async="true";
a.src="https://XXXXXXX.collect.igodigital.com/collect.js";
var b=document.getElementsByTagName("script")[0];
b.parentNode.(a,b);return a})();
1
  • I know this is an old question Tyler, but I am at the beginning of implementing Streaming Catalog Updates. I am just trying to test on Postman for now. I see in the above code that the URL has XXXXXXX. Could you please tell me where one gets the endpoint URL? I cannot find them in Setup > Apps > Installed Packages > API Integration in the Marketing Cloud. Thanks in advance! Commented Sep 16 at 8:22
0

I just tested this code and it works:

<html>
<script type="text/javascript" src="https://XXXXX.collect.igodigital.com/collect.js"> </script>
 <script type="text/javascript"> 
 _etmc.push(["setOrgId", "XXXXXX"]);
 _etmc.push(["trackPageView"]);
  </script>
  <script type="text/javascript">
      _etmc.push(["updateItem", 
         {
          "item": "123456789",
          "name": "Gloves",
          "url": "https://ntoretail.com/shop/mens/accessories/1600100",
          "item_type": "product",
          "availability": "y",
          "regular_price": "5.00",
          "imagelink": "https://s3-us-west-2.amazonaws.com/nto-products/products1110/1600100.jpg"
         }
      ]);
</script>
<body>
 BODY


</body>
</html>
1
  • Hi, Eazye, I am new to personalization builder and can't find an answer to a question that why does marketing cloud needs streaming updates to the catalog twice in a day when the images are static and uploaded/ changed one in a while. Commented Jan 20, 2020 at 13:46

You must log in to answer this question.

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