10-20-2016 04:46 AM
we are using the Data Layer Enrichment Feature.
Our use case is easy: we have products with "id" and we retrieve the "product_category"
Everything is working as expected with single products.
We have pages with multiple products and would like to retrieve several categories.
I tried to pass an array like this:
id: ["prod_id_1", "prod_id_2"]
Unfortunatly, this is not working, and the file retrieved is prod_id_1,prod_id_2.js
I couldn't find any further information in the documentation.
Can you help on this issue?
10-25-2016 03:02 PM - edited 10-26-2016 07:44 AM
Apologies for a late response.
The API will accept a string of data, and that string must reference a single value.
The issue with what you are trying to do is that the response of each successive call will overwrite that response of each prior call.
So let's say you have ["prod_id_1", "prod_id_2"]
And the lookup output for prod_id_1 is:
While the lookup output for prod_id_2 is:
Notice how the output keys are the same.
When the logic runs, prod_id_1 will be imported and set prod_sku and prod_name, then when the following prod_id_2 call occurs it will overwrite prod_sku and prod_name. Meaning you'll only ever have one set of keys available.
Does that help answer you question?
10-26-2016 07:52 AM
Not at this time. The API was built to serve single item info, for example on a product page.
We would have to make an update to the system to handle a lookup on an array of data, and to append to an array of data. I have submitted the appropriate request to Engineering for review.
10-26-2016 07:57 AM
We would also need this feature by the way. We have product lists, or a user can have multiple products in his cart or checkout, so there is always the need to grab multiple product's data in one request.
To only allow this for one product is a bit short-sighted imho.
05-18-2017 02:40 AM
do you have an update on the status on the lookup for multiple products? This is quite a critical issue for us.
Moreover: We would like to be able to do the data layer enrichment not only on pageload, but also on subsequent utag.link events. If I understand correctly, this is not possible right now. Could you please advice on how to get that working and / or extend the extension?
If both features (multiple products + lookup on link events) were available, this would be a great plus compared to other TMS imho.
Thanks and best,
05-18-2017 08:29 AM
This request has been submitted but not yet added to our roadmap. Please escalate again through your channel manager or account manager so that it can follow the appropriate process. They will need to own the communication within the business and between the agency or client.
05-19-2017 07:52 AM
Thanks for your reply!
I suppose you are relating to the first issue (multiple products).
What about the second issue (DLE on link events)? Is there something we / Tealium can do to make that possible?
Thanks and best,
05-19-2017 11:40 AM
I'm going to have to assume the issue you're running up against is that when DLE API is ran on page load, the returned DLE data isn't persisted in the global utag.data object for post page load event tracking. If so, please let me know if the below is what you are looking for.
utag.ut.merge(utag.data,b,1); to a JS extension scoped to All Tags and Before Load Rules so that the DLE data is persisted.
Then pass that DLE data as part of the utag.link call. For example, if you have a jQuery extension that tracks the Add to Cart event and you want to pass the
product_availability DLE variables then you would configure the extension as follows:
Hope this helps!
05-20-2017 05:23 AM
05-22-2017 10:45 AM
Thanks for the additional information.
If you run utag.view instead of utag.link then the DLE API will run. Would that work for you? utag.view will run extensions scoped to All Tags and run the API.
05-29-2017 04:53 AM - last edited on 05-30-2017 11:38 AM by kathleen_jo
Hi @dan_george, thanks, we had thought about this ourselves already, but this would require all kinds of major changes to the current tracking. We don't want to change everything around just because of one new feature.
And it would cover only this one use case. There will be others in the future where the ID of a product will only be known later and not on the pageview, so I don't want yet another ugly workaround for these things (Tealium is full of workarounds anyway already)...