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.
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
1. Use %dataLayerRoot.cart% as the Root Data Object.
2. Use "products" as the Product Collection Path.
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.product digitalData.cart.products.price digitalData.cart.products.quantity digitalData.cart.products.product digitalData.cart.products.price digitalData.cart.products.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).
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 ?
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.