ClickCease Track SnapEngage Chats - Help Center - WhatConverts

Track SnapEngage Chats

SnapEngage is a live chat solution designed to help sales and support teams engage with website visitors. You can track SnapEngage chat conversations in WhatConverts by using Zapier and custom JavaScript to capture complete marketing attribution data.

Note: If you haven't added your WhatConverts tracking script to your website, add your tracking script. If you are using the WhatConverts WordPress Plugin, you will want to deactivate the plugin and place your WhatConverts Tracking Code above your SnapEngage install code.

Set Up SnapEngage Chat Tracking

To capture lead data from SnapEngage, you must pass tracking data into SnapEngage as a variable and then send that data to WhatConverts via Zapier.

Step 1: Add Tracking Code to Your Website

Locate your SnapEngage chat widget installation code on your website. Add the following script directly above your installation code:

  <script type="text/javascript">
      var source_data = oqhaqzwnbjgcpycneryg('wc_client');
  </script>

Step 2: Configure SnapEngage Settings

  1. Log in to SnapEngage.
  2. Under the current widget, select "Settings".
  3. Track SnapEngage Chats

  4. Select “Options" at the top of the settings menu.
  5. Beside collect additional information, add the following JavaScript variable: source_data.
  6. Click "Save Changes".
  7. Track SnapEngage Chats

Step 3: Configure the Zapier Trigger

  1. Go to Zapier and click "Create Zap".
  2. Select "Webhooks by Zapier" as your trigger app and "Catch Hook" as the trigger event.
  3. Click "Continue" and copy the webhook URL.
  4. Go back to SnapEngage, paste the webhook URL into the integration URL box, and click "Save Changes".
  5. Track SnapEngage Chats

  6. Go to your website and start (and end) a test chat session.
  7. Return to Zapier, click "Test Trigger", select the hook found, and click "Continue".

Step 4: Add JavaScript Formatting

  1. Add an action step in Zapier and select "Code by Zapier" as the action app.
  2. Select "Run JavaScript" as the action event.
  3. Under input data, type source_data in the left box and select the JavaScript variables from your catch hook step in the right box.
  4. Under code, paste the following:

    JavaScript

      var [source, medium, campaign, content, keyword, gclid, landing_page, user_id, msclkid] = ['', '', '', '', '', '', '', ''];
      var data = inputData.source_data.match(/name: source_datanvalue: (.*)/);
      if (data[1]) {
          var data_parts = data[1].split('+..+');
          if (data_parts[0]) source = data_parts[0];
          if (data_parts[1]) medium = data_parts[1];
          if (data_parts[2]) campaign = data_parts[2];
          if (data_parts[3]) content = data_parts[3];
          if (data_parts[4]) keyword = data_parts[4];
          if (data_parts[5]) gclid = data_parts[5];
          if (data_parts[6]) landing_page = data_parts[6];
          if (data_parts[7]) user_id = data_parts[7];
          if (data_parts[8]) msclkid = data_parts[8];
      }
      output = [{
          source: source,
          medium: medium,
          campaign: campaign,
          content: content,
          keyword: keyword,
          gclid: gclid,
          landing_page: landing_page,
          msclkid: msclkid
      }];
    
  5. Click "Continue", run a test, and click "Continue" again.

Step 5: Map Fields to WhatConverts

  1. Add another action step and select "WhatConverts" as the action app.
  2. Select "Create Lead" and click "Continue".
  3. Select your WhatConverts profile.
  4. Set up the template using these mappings:
    • Lead Type: Chat
    • Referrer Source: Step 2 - Source
    • Referrer Medium: Step 2 - Medium
    • User ID: Step 2 - User ID
  5. Add these fields under additional fields:
    • Transcript: Step 1 - Transcripts
    • Email: Step 1 - Requester Details Emails
    • Name: Step 1 - Requester Details Name
    • Chat URL: Step 1 - URL
  6. Click "Continue", send a test to WhatConverts, and turn your zap on.

Related Topics

Get a FREE presentation of WhatConverts

One of our marketing experts will give you a full presentation of how WhatConverts can help you grow your business.

Schedule a Demo
ready to get marketing clarity?

Grow your business with WhatConverts

14 days free trial Easy setup Dedicated support
G2 Best Results Summer 2025 Badge
G2 Best Relationship Summer 2025 Badge
G2 Best Usability Summer 2025 Badge
G2 Most Implementable Summer 2025 Badge
G2 Momentum Leader Summer 2025 Badge