Segment

Segment

đź’ˇ
Follow this guide to get Segment setup in your Divjoy codebase. Click the ▶︎ icon next to any step to see a detailed walkthrough with screenshots. If anything is confusing please reach out.

Basic Setup

‣
Signup for Segment and copy your Write Key.

After signup click the "Add Source" button

image

Select Javascript and then click the “Next” button

image

Name your site, enter your website URL, then click “Create Source”. We recommend creating a Segment source just for local testing with your localhost URL.

image

You can find your Write Key within the install snippet. Just copy the part that you see highlighted in the screenshot below. You don't need the full snippet because Divjoy has everything setup for you already.

image

You can also find your Write Key by navigating to “Sources”, selecting your source, then going to the “Settings” tab.

image
  • Add your Write Key to your codebase .env file.

🙌
You should now have a working Segment analytics in your web app