Anyone gotten the Launch AA Product String Builder to work without their Data Layer management tool?? I just tested it on Adobe's AEM we.retail demo site and either it won't recognize a direct object reference (like typing digitalData.cart.products instead of using a data element) or if I use a data element throws a runtime error.
launch-54a7599c3ecf-development.min.js:3 Uncaught (in promise) TypeError: this.settings.productCollectionPath.replace is not a function
at n.getProductCollectionPath (launch-54a7599c3ecf-development.min.js:3)
at n.setProductBase (launch-54a7599c3ecf-development.min.js:3)
at n.buildProductMapping (launch-54a7599c3ecf-development.min.js:3)
at launch-54a7599c3ecf-development.min.js:3
Sometimes it will recognize the data layer; when it does - the error above is thrown.
Solved! Go to Solution.
If you are using the data element definition as:
and using the data element as below:
It should work.
If it still doesn't work, I suspect, if the data layer is being overwritten by the time code runs ?
Views
Replies
Total Likes
For the error you're facing, could you please share the value you're passing to AA product string extension ?
I believe you're using Search discovery extension to set products variable.
Ideally, the way you pass values to "AA Product String Builder" in rule action as-
Root Data Object = Dataelement (which return root object, for example: dataLayerRoot)
Product Collection Path = cart.products
Product Strings Core Settings:
Category = product
Product ID = productsku
Views
Replies
Total Likes
Try this:
1. Use %dataLayerRoot.cart% as the Root Data Object.
2. Use "products" as the Product Collection Path.
You will need a data element named "dataLayerRoot.cart" of JavaScript variable type to return your "dataLayerRoot.cart" object for step 1.
Views
Replies
Total Likes
Tried a number of variations without success; either I still get the error in the original screenshot, it fails silently or the products string is malformed. Simple Data Layer below:
digitalData.cart.products[0].product digitalData.cart.products[0].price digitalData.cart.products[0].quantity digitalData.cart.products[1].product digitalData.cart.products[1].price digitalData.cart.products[1].quantity
The documentation from the extension says it's expecting "digitalData" in the root, "cart.products" in the Product Collection path and "product" in Path to Product ID box.
Except, that doesn't work for me. Unless I'm doing it incorrectly, the extension tracks "_0" as the product id (you can see the actual id in the original screenshot).
Views
Replies
Total Likes
@ExpCloudMember Can you share the definition within digitalData data-element, that you're using in Root ?
Views
Replies
Total Likes
Core > JavaScript Variable returns "digitalData"
Views
Replies
Total Likes
If you are using the data element definition as:
and using the data element as below:
It should work.
If it still doesn't work, I suspect, if the data layer is being overwritten by the time code runs ?
Views
Replies
Total Likes
No, the DL is still present and not over-written by the time this Rule runs (set at page bottom). I agree with you, it "should" work - but it doesn't. My screenshot looks exactly like yours.
Views
Replies
Total Likes
Views
Likes
Replies