• Pierre Grandjean_
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
  • 1
I making a chat bot and i call a apex class which return a value list, how can i show this list as list in a message? or that not is posible?

User-added image

Actually only it show the first value, but the method return a value list.

User-added image
i hope you can help me.
I've managed to import the Google Tag Manager code into the <head> using the lightning community settings tab. This loads perfectly fine and I can see the 'preview' window for google tag manager.

<!-- Google Tag Manager -->
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    <!-- End Google Tag Manager -->

However, when I try to access the 'dataLayer' or 'window.dataLayer' object in a lightning component controller, it appears as undefined. I understand this is due to the SecureWindow that has been implemented.

For example:

addCourseToCart : function(component, event, helper) {
        'event': 'addToCart',
        'ecommerce': {
          'currencyCode': 'EUR',
          'add': {                                // 'add' actionFieldObject measures.
            'products': [{                        //  adding a product to a shopping cart.
              'name': 'Triblend Android T-Shirt',
              'id': '12345',
              'price': '15.25',
              'brand': 'Google',
              'category': 'Apparel',
              'variant': 'Gray',
              'quantity': 1

Is there still no way at all I can access the dataLayer using lightning communities and components? If not, this unfortunately makes it a nightmare for my customer to track in-depth interactions on their community... I'm surprised Salesforce have overlooked this...