Button Destination

Button quick info

Button is in beta, and accepts Track calls. If you reference it in the Integrations object, call it “Button”.

Button is the mobile commerce technology company that is powering a commerce-driven internet. The Button platform powers mobile business growth for the world’s largest brands and publishers, while offering consumers more seamless, enjoyable experiences.

This destination is maintained by Button. For any issues with the destination, contact the Button Support team.

Getting Started

Contact your Button representative for your Button API Key.

  1. From the Destinations catalog page in the Segment App, click Add Destination.
  2. Search for “Button” in the Destinations Catalog, and select the Button destination.
  3. Choose which Source should send data to the Button destination.
  4. Enter the “API Key” in the Button destination settings in Segment.

Track

If you aren’t familiar with the Segment Spec, take a look at the Track method documentation to learn about what it does. An example call would look like:

analytics.track('Deep Link Opened')

Segment sends Track calls to Button as a track event.

To track deep links from your app or website, use Segment’s Deep Link Opened and Application Opened events.

Make sure you pass the referring URL. An example would look like:

analytics.track('Application Opened' { someProperty: true }, {
  userId: '1234567890',
  properties: {
    url: 'brand-app://?btn_ref=srctok-XXX'
  }
  ...
})

Tip! Make sure you record any different names for Deep Link Opened Track events across your sources so you know which are sent where.

Installs

To track mobile app installs, use Segment’s Application Installed event.

Capture the referring URL when possible. An example would look like:

analytics.track('Application Installed' { someProperty: true }, {
  userId: '1234567890',
  properties: {
    url: 'https://brand-homepage.com?btn_ref=srctok-XXX'
  },
  context {
    app: { version: '4.15.0' },
    device: {
      adTrackingEnabled: false,
      advertisingId: 'XXXXXXXX-YYYY-ZZZZ-1111-222222222222'
    },
    ip: '127.0.0.1',
    locale: 'en-US',
    os: {
      name: 'iOS',
      version: '14.2'
    }
  }
  ...
})

Tip! Make sure you record any different names for Application Installed Track events across your sources so you know which are sent where.

Orders

To track order events from your app or website, use Segment’s Order Completed event.

An example call would look like:

analytics.track('Order Completed' { someProperty: true }, {
  userId: '1234567890',
  properties: {
    subtotal: 7500,
    products: [
      {
         sku: 'sku-123',
         description: 'T-Shirt',
         size: 'L',
         price: 2500,
         quantity: 1,
         category: 'Clothing',
      },
      {
         sku: 'sku-456',
         description: 'Joggers',
         size: 'M',
         price: 5000,
         quantity: 1,
         category: 'Clothing',
      }
    ]
  }
})

Tip! Make sure you record any different names for Order Completed Track events across your sources so you know which are sent where.

Setting up a Destination Filter

If you are a Business Tier customer, you can set up a Destination Filter to only send your Deep link and Order events to Button.

Read Button’s Destination Filter documentation to learn more.

Personas

You can send computed traits and audiences generated using Segment Personas to this destination as a user property. To learn more about Personas, contact us for a demo.

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Personas sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it’s been more than 30 days since their last order), Personas sets that value to false.

When you first create an audience, Personas sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

Setting Description
API Key
(required)
string. Please contact your Button representative for instructions on finding your Segment-specific API key.

This page was last modified: 10 Feb 2021



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account