LivePerson LiveEngage object missing cart layer

timmychap
Rookie Contributor
timmychap

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

3 REPLIES 3

LivePerson LiveEngage object missing cart layer

timmychap
Rookie Contributor
timmychap

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?

LivePerson LiveEngage object missing cart layer

Tealium Expert
Tealium Expert

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.

LivePerson LiveEngage object missing cart layer

Tealium Expert
Tealium Expert

The tag has mappings set up like this:

2018-08-20_16-23-44.png

 

and then we have a number of extensions (basically one for each page of the journey) which follow this basic pattern:

2018-08-20_16-26-06.png

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