8000 customData not transmitted with the start message · Issue #54 · userlike/messenger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
customData not transmitted with the start message #54
Open
@mholsten

Description

@mholsten

Hey,

I'm trying to get customData passed.
I set it as follows:

  async function runWidget() {
          const api = await createApi();
          api.mount().subscribe((result) => {
              if (result.kind === "error" || !result.value) {
                  console.error("Failed to mount messenger");
                  return;
              }

              const messenger = result.value;
              document.getElementById('login-btn').addEventListener('click', () => {
                  messenger.maximize();
                  messenger.setCustomData({
                      tracking_id: document.querySelector('input#trackingIdInput').value,
                      customer_id: document.querySelector('input#customerIdInput').value,
                  });
              });
          });
      }

This is also passed in the message call but not in the start message. However, I need it in the start message to be able to react to it directly.

I have found a small workaround. If I display the privacy policy before the chat, then the customData is also transmitted in the start message.
However, my customer does not want the privacy policy to be displayed via this overlay.

Can you reproduce the behavior? Is there a better solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0