Skip to main content
How to Integrate Segment

Follow these steps to easily integrate Segment with your checkout.

Lucia Burin Sestakova avatar
Written by Lucia Burin Sestakova
Updated over 3 months ago

πŸ“’ NOTE

The below guide is comprehensive enough to get you started with Segment. However, if you require more detailed information, please visit Segment's Getting Started Guide.

Create a Segment Account

If you already have a Twilio account, log in and select Sign up with my Twilio credentials.

  1. Fill in the form and press the Sign up button.

  2. You will receive a verification link to the email address you provided in the sign up form.

  3. Click the link to verify your email.

  4. Sign in to with your email address.

Create a Workspace

You are then redirected to Segment Workspaces.

πŸ“— TIP

A workspace is automatically created for you with your name. You can however create a new organisation-wide workspace by following the below guide.

  1. Press the New Workspace button.

  2. In the 'Nickname' field, enter your company's name.

  3. Enter your billing email.


    πŸ“— TIP

    This email address is used to communicate any billing information or important notices regarding your account and workspace.


  4. Press the Create Workspace button.

On the next screen, press the Get started button and fill out a brief questionnaire about your plans with Segment. Then press the Next step button.

Add a Source

  1. In your Segment dashboard, go to Connections > Sources.

  2. Press the Add source button.

  3. In the Catalog, select Javascript in the Website section.

  4. Press the Add Source button.

  5. Enter the name of the source.


    πŸ“— TIP

    The name helps you identify the source within your workspace, and typically includes the product are and environment, for instance, Website Prod.


  6. Enter a label to help organise and filter your sources.

  7. Enter your website URL (optional).

  8. Then press the Add Source button.

  9. You are redirected to the source Overview tab. It contains the JavaScript snippet which contains the 'Write Key', a unique identifier of your account, workspace, connection and source.

  10. Press the Copy Snippet button to copy the JavaScript snippet and paste it in a text or source code editor. It will be used in the next steps.

Install Segment

WHAT DOES IT MEAN?

When you implement Segment, you integrate Segment's code into your website, app, or server. This code then tracks user interactions and events, generating data messages based on the specific triggers you define.

  1. In your source view, go to the Settings tab.

  2. Navigate to API Keys in the left-hand navigation.

  3. Check the value of the 'Write Key' here against the value in the analytics.load part of the source snippet copied into a text editor from the Overview tab (step 10. of the Add a Source section).

  4. If the two values match, open the HTML file of your website where you want to track events.


    πŸ“— TIP

    This is typically the main HTML file, for instance, index.html.


  5. Paste the JavaScript snippet you copied in step 10 the <head> element of your HTML file and save your changes.


    πŸ“’ NOTE

    Pasting the snippet into the <head> element ensures it loads immediately when a user visits your site.


πŸ“— TIP

For more in-depth information about Installing Segments, please visit Segment's documentation or contact your Ventrata Customer Success Representative directly.

Did this answer your question?