-
Notifications
You must be signed in to change notification settings - Fork 370
Batch documentation #7677
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
Open
alecbatch
wants to merge
4
commits into
segmentio:develop
Choose a base branch
from
alecbatch:batch/destination
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10
−90
Open
Batch documentation #7677
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6a67129
Batch documentation
7db8518
Update src/connections/destinations/catalog/batch/index.md
sade-wusi 2c09ccb
Update src/connections/destinations/catalog/batch/index.md
sade-wusi 04003c3
Update src/connections/destinations/catalog/batch/index.md
sade-wusi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,21 @@ | ||
--- | ||
title: Batch Destination | ||
id: 596d11f870a3e552b957e6d9 | ||
--- | ||
The Batch.com integration code is open sourced on GitHub. Feel free to check it out: [iOS](https://github.com/BatchLabs/ios-segment-integration){:target="_blank"}, [Android](https://github.com/BatchLabs/android-segment-integration){:target="_blank"}. | ||
|
||
## Getting Started | ||
{% include content/plan-grid.md name="actions" %} | ||
|
||
* Batch.com supports the `screen`, `track`, `identify` and `group` methods. | ||
|
||
* Make a Batch.com account. | ||
* Turn on Batch.com using Segment dashboard. | ||
* Enter your Batch LIVE API Key. You can find it in your dashboard, under 'settings'. | ||
Batch is a powerful customer engagement platform that helps businesses deliver personalized, timely notifications and messages to boost user retention and drive growth. Discover how Batch can transform your communication strategy at Batch. | ||
sade-wusi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Events tracked using Segment's `track`/`screen` will automatically be tracked. `Identify` and `group` calls will also be mapped to Batch user data. | ||
This destination is maintained by Batch. For any issues with the destination, [contact their Support team](mailto:[email protected]). | ||
|
||
## Android | ||
## Getting started | ||
|
||
### Installation | ||
1. From your workspace's [Destination catalog page](https://app.segment.com/goto-my-workspace/destinations/catalog){:target="_blank"} search for Batch. | ||
sade-wusi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. Select **Batch** and click **Add Destination**. | ||
3. Select an existing Source to connect to Batch (Actions). | ||
sade-wusi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
4. Go to the [Batch dashboard](https://dashboard.batch.com/){:target="_blank"}, find and copy the **Project Key** / **REST API Key** | ||
5. Enter the **Project Key** / **REST API Key** in the Batch destination settings in Segment. | ||
|
||
Add the following dependency in your build.gradle: | ||
|
||
``` | ||
compile "com.batch.android:sdk-segment-integration:+" | ||
``` | ||
|
||
Import the integration: | ||
|
||
``` | ||
import com.segment.analytics.android.integrations.batch.BatchIntegration; | ||
|
||
``` | ||
|
||
Then, add the factory to your Analytics instance: | ||
|
||
```java | ||
Analytics analytics = new Analytics.Builder(this, "write_key") | ||
.use(BatchIntegration.getFactory(this)) | ||
.build(); | ||
``` | ||
|
||
|
||
## iOS | ||
|
||
### Installation | ||
|
||
Add the following Cocoapods dependency: | ||
|
||
``` | ||
pod 'Segment-Batch' | ||
``` | ||
|
||
If you integrate in a Swift project or have `use_frameworks!` in your Podfile, you need to use the following to work around due to a limitation with Cocoapods: | ||
|
||
``` | ||
pod 'Batch' | ||
pod 'Segment-Batch/StaticLibWorkaround' | ||
``` | ||
|
||
Then, add the integration factory in your Analytics instance: | ||
|
||
```objc | ||
#import <Segment-Batch/SEGBatchIntegrationFactory.h> | ||
|
||
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:@"MySegmentWriteKey"]; | ||
[config use:[SEGBatchIntegrationFactory instance]]; | ||
[SEGAnalytics setupWithConfiguration:config]; | ||
``` | ||
|
||
## Server Side | ||
|
||
You can transmit server-side data from Segment to Batch with a [destination function](/docs/connections/functions/destination-functions/). Follow the steps outlined [in Batch's documentation](https://help.batch.com/en/articles/2208243-how-to-connect-batch-to-segment){:target="_blank"} for a smooth integration. | ||
|
||
## Screen | ||
|
||
When you call `screen` in your mobile app, we send a screen view to an event named `SEGMENT_SCREEN`. The screen name will be tracked as the event's label. | ||
|
||
## Identify | ||
|
||
When you `identify` a user, we'll pass that user's information to Batch as the custom user identifier. Batch supports tracking anonymous users, but not through Segment's `anonymousId`. | ||
|
||
Tracked events are attached to the installation ID, and the installation ID itself can be attached/detached to a user at a later date, with no data loss. | ||
|
||
## Track | ||
|
||
When you `track` an event, we will send that event to Batch after converting the name to fit Batch's event naming rules. | ||
|
||
For example, an event named `Ad Shown` will become `AD_SHOWN`. Note that this means that event names longer than 30 characters will be truncated. | ||
The events `title` property will become the event's label. | ||
|
||
## Group | ||
|
||
When you call `group`, we will set the group ID in a user attribute named `SEGMENT_GROUP`. | ||
|
||
## Features | ||
|
||
All of our supported Segment integration features will work automatically, with no action or specific properties required on your side. | ||
|
||
Batch's other features are available directly by using the native SDK, which comes bundled with this integration. | ||
|
||
To use the Batch native SDK through Segment, follow the [instructions for Android](/docs/connections/sources/catalog/libraries/mobile/android/#how-can-i-use-a-destination-specific-feature) and [instructions for iOS](/docs/connections/sources/catalog/libraries/mobile/ios/#what-if-your-sdk-doesnt-support-feature-x). | ||
{% include components/actions-fields.html %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alecbatch Was the page ID deliberately deleted?