Skip to content

Server-side libraries troubleshooting information + Vale pass #6625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/_includes/content/server-side-troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% assign currentSlug = page.url | split: "/" | last %}
{% assign currentIntegration = site.data.catalog.sources.items | where: "slug", currentSlug | first %}

### Other common errors

If you are experiencing data loss from your {{ currentIntegration.display_name }} source, you may be experiencing one or more of the following common errors:

- **Payload is too large**: If you attempt to send events larger than 32KB per normal API request or batches of events larger than 500KB per request, Segment’s tracking API responds with `400 Bad Request`. Try sending smaller events (or smaller batches) to correct this error.

- **Identifier is not present**: Segment's tracking API requires that each payload has a `userId` and/or `anonymousId`. If you send events without either the `userId` or `anonymousId`, Segment's tracking API responds with an `no_user_anon_id` error. Check the event payload and client instrumentation for more details.

- **Track event is missing name**: All Track events to Segment must have a name in string format.

- **Event dropped during deduplication**: Segment automatically adds a `messageId` field to all payloads and uses this value to deduplicate events. If you're manually setting a `messageId` value, ensure that each event has a unique value.

- **Incorrect credentials**: Double check your credentials for your downstream destination(s).

- **Destination incompatibility**: Make sure that the destination you are troubleshooting can accept server-side API calls. You can see compatibility information on the [Destination comparison by category](/docs/connections/destinations/category-compare/) page and in the documentation for your specific destination.

- **Destination-specific requirements**: Check out the [destination's documentation](/docs/connections/destinations/) to see if there are other requirements for using the method and destination that you're trying to get working.
52 changes: 25 additions & 27 deletions src/connections/sources/catalog/libraries/server/clojure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The clojure library lets you record analytics data from your clojure code. The r

The library is open-source and was contributed by [CircleCI](https://circleci.com/){:target="_blank"}. You can [check it out on GitHub](https://github.com/circleci/analytics-clj){:target="_blank"}. The clojure library is a wrapper around Segment's [Java library](https://github.com/segmentio/analytics-java){:target="_blank"}.

The clojure library (like our other server side libraries) is built for high-performance, so you can use them in your web server controller code. This library uses an internal queue to make calls non-blocking and fast. It also batches messages and flushes asynchronously to our servers.
The Clojure library (like Segment's other server side libraries) is built for high-performance, so you can use them in your web server controller code. This library uses an internal queue to make calls non-blocking and fast. It also batches messages and flushes asynchronously to Segment's servers.

## Getting Started

Expand Down Expand Up @@ -54,19 +54,19 @@ The default initialization settings are production-ready.

## Identify

`identify` lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about them.
Identify calls let you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about them.

Segment recommends calling `identify` a single time when the user's account is first created, and only identifying again later when their traits are change.
Segment recommends calling Identify a single time when the user's account is first created, and only identifying again later when their traits are change.

Example `identify` call:
Example Identify call:

```
(identify analytics "user-id" {:email "bob@acme.com"})
```

This call is identifying the user by his unique User ID (the one you know him by in your database) and labeling him with an `email` trait.

The `identify` call has the following fields:
The Identify call has the following fields:

<table class="api-table">
<tr>
Expand All @@ -79,17 +79,17 @@ The `identify` call has the following fields:
</tr>
</table>

Find details on the **identify method payload** in our [Spec](/docs/connections/spec/identify/).
Find details on the **identify method payload** in the [Segment Spec](/docs/connections/spec/identify/).

## Track

`track` lets you record the actions your users perform. Every action triggers what we call an "event", which can also have associated properties.
Track calls let you record the actions your users perform. Every action triggers what Segment calls an "event", which can also have associated properties.

You'll want to track events that are indicators of success for your site, like **Signed Up**, **Item Purchased** or **Article Bookmarked**.

To get started, we recommend tracking just a few important events. You can always add more later!
To get started, Segment recommends tracking just a few important events. You can always add more later.

Example `track` call:
Example Track call:

```
(track analytics "user-id" "Signed Up" {:plan "trial"})
Expand All @@ -101,11 +101,11 @@ Example `track` call:
:integration-options {"Amplitude" {:session-id (:id session)}}})
```

This example `track` call tells us that your user just triggered the **Signed Up** event on a "trial" plan.
This example Track call tells you that your user just triggered the **Signed Up** event on a "trial" plan.

`track` event properties can be anything you want to record. In this case, plan type.
Track event properties can be anything you want to record. In this case, plan type.

The `track` call has the following fields:
The Track call has the following fields:

<table class="api-table">
<tr>
Expand All @@ -114,19 +114,19 @@ The `track` call has the following fields:
</tr>
<tr>
<td>`event` _String_</td>
<td>The name of the event you're tracking. We recommend human-readable names like <strong>Song Played</strong> or <strong>Status Updated</strong>.</td>
<td>The name of the event you're tracking. Segment recommends human-readable names like <strong>Song Played</strong> or <strong>Status Updated</strong>.</td>
</tr>
<tr>
<td>`properties` _Map, optional_</td>
<td>A map of properties for the event. If the event was <strong>Added to Cart</strong>, it might have properties like <code>price</code> or <code>product</code>.</td>
</tr>
</table>

Find details on **best practices in event naming** as well as the **`track` method payload** in our [Spec](/docs/connections/spec/track/).
Find details on **best practices in event naming** as well as the **Track method payload** in the [Segment Spec](/docs/connections/spec/track/).

## Group

`group` lets you associate an [identified user](/docs/connections/sources/catalog/libraries/server/java/#identify) user with a group. A group could be a company, organization, account, project or team! It also lets you record custom traits about the group, like industry or number of employees.
Group lets you associate an [identified user](/docs/connections/sources/catalog/libraries/server/java/#identify) user with a group. A group could be a company, organization, account, project or team. It also lets you record custom traits about the group, like industry or number of employees.

This is useful for tools like [Intercom](/docs/connections/destinations/catalog/intercom/), [Preact](/docs/connections/destinations/catalog/preact/) and [Totango](/docs/connections/destinations/catalog/totango/), as it ties the user to a **group** of other users.

Expand All @@ -135,7 +135,7 @@ This is useful for tools like [Intercom](/docs/connections/destinations/catalog/
(group analytics "1234" "group-5678" {:name "Segment"})
```

The `group` call has the following fields:
The Group call has the following fields:

<table class="api-table">
<tr>
Expand All @@ -152,11 +152,11 @@ The `group` call has the following fields:
</tr>
</table>

Find more details about `group`, including the **`group` payload**, in our [Spec](/docs/connections/spec/group/).
Find more details about Group, including the **Group payload**, in the [Segment Spec](/docs/connections/spec/group/).

## Screen

The [`screen`](/docs/connections/spec/screen/) method lets you record whenever a user sees a screen of your mobile app, along with optional extra information about the page being viewed.
The [Screen](/docs/connections/spec/screen/) method lets you record whenever a user sees a screen of your mobile app, along with optional extra information about the page being viewed.

You'll want to record a screen event an event whenever the user opens a screen in your app.

Expand All @@ -166,7 +166,7 @@ Not all services support screen, so when it's not supported explicitly, the scre
(screen analytics "1234" "Login" {:path "/users/login"})
```

The `screen` call has the following fields:
A Screen call has the following fields:

<table class="api-table">
<tr>
Expand All @@ -175,7 +175,7 @@ The `screen` call has the following fields:
</tr>
<tr>
<td>`name` _String_</td>
<td>The webpage name you're tracking. We recommend human-readable names like **Login** or **Register**.</td>
<td>The webpage name you're tracking. Segment recommends human-readable names like **Login** or **Register**.</td>
</tr>
<tr>
<td>`properties` _Properties, optional_</td>
Expand All @@ -185,17 +185,17 @@ The `screen` call has the following fields:

## Alias

`alias` is how you associate one identity with another. This is an advanced method, but it is required to manage user identities successfully in *some* of our destinations.
Alias is how you associate one identity with another. This is an advanced method, but it is required to manage user identities successfully in *some* destinations.

In [Mixpanel](/docs/connections/destinations/catalog/mixpanel/#alias) it's used to associate an anonymous user with an identified user once they sign up. For [Kissmetrics](/docs/connections/destinations/catalog/kissmetrics/#alias), if your user switches IDs, you can use 'alias' to rename the 'userId'.

Example `alias` call:
Example Alias call:

```
(alias analytics "user-id" "real-id")
```

For more details about `alias`, including the **`alias` call payload**, check out our [Spec](/docs/connections/spec/alias/).
For more details about Alias, including the **Alias call payload**, check out the [Segment Spec](/docs/connections/spec/alias/).

---

Expand Down Expand Up @@ -234,8 +234,6 @@ You can set a custom logger on the client using:

1. Double check that you've set up the library correctly.

2. Make sure that you're calling one of our API methods once the library is successfully installed—[`identify`](#identify), [`track`](#track), etc.
2. Make sure that you're calling one of Segment's API methods once the library is successfully installed, like [Identify](#identify) or [Track](#track).



{% include content/troubleshooting-server-integration.md %}
{% include content/server-side-troubleshooting.md %}
Loading