How do I add dataLayer data to feedback?

The following article will explain to you how you can send data layers to Mopinion.

Instructions

  1. In your form, add the element website data, this article will provide you with more information.

  2. There are 2 ways to add data layers:

2a. Often you do not need all the information in a data layer. You could then use the following method to select data from a specific key:

Do note, this method will only return the first value found. If there are more entries in the data layer with an ecommerce key, these will not be returned.

The * wildcard can be used recursively. E.g. dataLayer[*].basket[*].prices

To iterate with a wildcard through the items in the array from the last item, the wildcard [*LAST] can be used. This can be useful for a dataLayer with events in SPA’s.

2b. The second method is to use an external JavaScript file.