Skip to main content

Overview

If you use Segment to collect website analytics, Unify can be connected to your Segment workspace as a destination to reveal web traffic data. This will also let you build audiences and Plays using Segment analytics data.

Steps

If you’re also using the Unify Tag, ensure it isn’t running on the same pages as Segment. Otherwise, events may be double counted.

Generate a key in Unify

  1. Log in to Unify
  2. Navigate to Settings → Integrations → Segment and click Setup
    Setup.png
  3. Click the Copy button to copy the write key to your clipboard
    Write Key.png

Add Segment destination

  1. Log in to Segment and click on the Destinations tab in the sidebar
    Screenshot 2023-08-23 at 8.02.29 PM.png
  2. Click Add destination in the top right corner
    Screenshot 2023-08-23 at 7.02.47 PM.png
  3. Search for “webhook” and select the Webhook (actions) destination
    Screenshot 2023-08-23 at 7.03.49 PM.png
  4. Click Add destination again in the top right corner
    Screenshot 2023-08-23 at 7.05.58 PM.png
  5. Select website source whose data you want to send to Unify and then click Next
    Screenshot 2023-08-23 at 7.08.02 PM.png
  6. Give this destination a name, make sure Fill in settings manually is selected, and click Create destination
    Screenshot 2023-08-23 at 7.13.50 PM.png
  7. Click on the Mappings tab on the top and then select New Mapping
    Screenshot 2023-08-23 at 7.18.04 PM.png
  8. Choose the Send option
    send-option.png
  9. Fill in the following mapping values…
    1. Under Section 2:
      1. Unify currently supports Page, Track, and Identify event types. You should select Add Condition for each event type and select any.
      2. If there are specific event types that you know you do not want to forward to Unify, you can omit them.
      event-trigger.png
      1. Click Generate sample event to populate the box with an example Segment event
      generate-sample-event.png
    2. Under Section 4:
      1. Next to URL, fill in the following value:
        https://analytics.unifygtm.com/api/v1/webhooks/segment
        
      2. List two values under Headers (click Add Mapping Field to add more boxes):
        1. <YOUR WRITE KEYX-Write-Key
        2. application-jsonContent-Type
      3. Be sure to replace <YOUR WRITE KEY> with the key you copied earlier
      map-fields.png
    3. Under Section 5:
      1. Send a test event to verify that it’s working
      Screenshot 2023-08-23 at 7.44.09 PM.png
That’s it! If you see Test event successfully received by destination., you’re all set. Traffic should now be flowing into Unify.