Overview

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

Steps

If you’re also using the Unify Tag, make sure that it isn’t running on the same websites as Segment or else 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

    Screenshot 2023-08-23 at 7.21.39 PM.png
  9. Fill in the following mapping values…

    1. Under Section 1:

      1. Unify currently supports Page, Track, and Identify event types. You should select any and then list all of these types.
      2. If there are specific event types that you know you do not want to forward to Unify, you can safely omit them.
      Screenshot 2023-08-23 at 7.24.38 PM.png
    2. Under Section 2:

      1. Click Load Sample Event to populate the box with an example Segment event
      Screenshot 2023-08-23 at 7.29.31 PM.png
    3. Under Section 3:

      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

      Screenshot 2023-08-23 at 7.42.22 PM.png
    4. Under Section 4:

      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 succeeded, you’re all set. Traffic should now be flowing into Unify.