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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

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?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
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

Avatar

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.

Avatar

Level 2
This solution is not useful since I need to trigger product view event on dataLayer push event.

Avatar

Correct answer by
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

Avatar

Level 2

Thanks @Stewart_Schilling!
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?