Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

TypeError: this.settings.productCollectionPath.replace is not a function at r.getProductCollectionPath

digitaldarpan
Level 2
Level 2

We are trying to generate “s.products” Adobe Analytics variable using AA Product String Builder via Launch. Unfortunately I am getting below errors on console.

digitaldarpan_0-1617697035489.jpeg


I am quoting necessary information below:

1. Rule structure on launch

digitaldarpan_1-1617697069913.jpeg

 

2. Action configuration for AA Product String Builder.

digitaldarpan_2-1617697091406.jpeg

 

3. DataLayer structure

digitaldarpan_3-1617697113523.jpeg

 

4. ‘Product collection path’ value passed by “eComm - productString” data elememt.

digitaldarpan_4-1617697143339.jpeg


Could you please help me on this?

Analytics Commerce launch
1 Accepted Solution
StewSchilling
Correct answer by
Community Advisor
Community Advisor

Hi @digitaldarpan , 

 

I am the author and maintainer of the Data Layer Manager and AA Product String Builder extensions.  You are very close to seeing this configuration working.  There are just two things that I need you to verify. 

1).  Please verify that the data element that is providing "Data Layer Root" is a DLM Context Aware data element and is configured like this (note that the Data Layer Path field is left empty): 

Screen Shot 2021-04-12 at 2.27.49 PM.png

 

2) The Product Collection Path should be set to the string "product" as below: 

Screen Shot 2021-04-12 at 2.31.15 PM.png

 

Everything else about your configuration looks just fine.   Please reply to let me know if this solved your issue. 

-Stew

View solution in original post

4 Replies
yuhuisg
Community Advisor
Community Advisor

Unfortunately, your setup isn't going to work.

AA Product String Builder expects your Root Data Object to look like this:

 

{
  products: [
    {
      id: '...',
      name: '...',
      price: ...,
      quantity: ...
    },
    {
      id: '...',
      name: '...',
      price: ...,
      quantity: ...
    },
    ...
  ]
}

 

In that case, the Product Collection Path would be set to the static string "products".

One quick solution is to use a Custom Code data element to nest your products array inside a key-value object, e.g.

 

return {
  products: _satellite.getVar("eComm - productString");
};

 

Then use that Custom Code data element as your Root Data Object in the AA Product String Builder, and "products" as your Product Collection Path.

digitaldarpan
Level 2
Level 2
This solution is not useful since I need to trigger product view event on dataLayer push event.
StewSchilling
Correct answer by
Community Advisor
Community Advisor

Hi @digitaldarpan , 

 

I am the author and maintainer of the Data Layer Manager and AA Product String Builder extensions.  You are very close to seeing this configuration working.  There are just two things that I need you to verify. 

1).  Please verify that the data element that is providing "Data Layer Root" is a DLM Context Aware data element and is configured like this (note that the Data Layer Path field is left empty): 

Screen Shot 2021-04-12 at 2.27.49 PM.png

 

2) The Product Collection Path should be set to the string "product" as below: 

Screen Shot 2021-04-12 at 2.31.15 PM.png

 

Everything else about your configuration looks just fine.   Please reply to let me know if this solved your issue. 

-Stew

View solution in original post

digitaldarpan
Level 2
Level 2

Thanks @StewSchilling!
Sorry to bother you again. I have one more doubt regarding purchase variable. My purchase event looks like below:

digitaldarpan_0-1619182247213.png

How should I send this data to Adobe Analytics? How can I capture total revenue from purchase?
Do i need to pass it on product varibale(s.products = "<Category>;<Product Name>;<Quantity>;<Price>;<Events>;<eVars>";) along with other details?