- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
08-19-2018 09:44 PM
We are using the default LivePerson LiveEngage 2.0 tag.
When the object is created in lpTag it is missing the cart node in the json.
Products and other metadata are correctly set up in the lpTag array, just not nested in a cart.
The example below is a functional call that flows through which we have manually created.
lpTag.sdes.push({ "type": "purchase", "orderId":"Move Request", "cart": { "products": [ { "product": { "name": "4444444", "category": "A", "sku": "2018-08-27" } }, { "product": { "name": "11111", "category": "B", "sku": "2018-08-29" } } ] } });
The example below is from the default tealium tag and does not insert the cart component into the lpTag object.
lpTag.sdes.push({ "type": "purchase", "orderId":"Move Request", "products": [ { "product": { "name": "4444444", "category": "A", "sku": "2018-08-27" } }, { "product": { "name": "11111", "category": "B", "sku": "2018-08-29" } } ] });
Is there a setting we can use in the tag config to set this cart layer???
Cheers,
Tim
Solved! Go to Solution.
08-19-2018 10:41 PM
For the time being we have sidestepped the issue by switching to another type of call to LivePerson prodview instead of purchase.
Would I expect that the output 'purchase' would adapt to use cart in the output json?
Do we need to be leveraging the core Tealium ecommerce data layer elements for this to work?
08-20-2018 08:23 AM
Hi @timmychap
I've used this template before, and after a lot of faffing about and going through the entire JS template, i eventually worked out that only certain parts of the sdes object are populated, and it all depends on (from memory) the "type" that you set against the tag.
The type can be a comma separated list of strings, so I ended up putting lots of them in each tag to make sure that all the bits that I needed were populated.
You don't need to use the ecommerce extension data objects, but if you don't you will need to set up the mappings yourself (which isn't a big job).
I'll see if I can find the set up I did (can't actually remember which client it was for) and get some examples for you.
08-20-2018 08:29 AM - edited 08-20-2018 08:30 AM
The tag has mappings set up like this:
and then we have a number of extensions (basically one for each page of the journey) which follow this basic pattern:
the LP_Type object defines which part of the sdes object is created, and then the data is populated using the normal mappings. Some of the extensions have a few other data objects set using jQuery to scrape data from the page.
Hope that helps
Copyright All Rights Reserved © 2008-2023