From ed6ac359ee0dd49d630428cc90ace3e7d780df68 Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 17 Sep 2023 21:42:54 -0500 Subject: [PATCH 01/21] First pass --- src/engage/campaigns/push-notifications.md | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/engage/campaigns/push-notifications.md diff --git a/src/engage/campaigns/push-notifications.md b/src/engage/campaigns/push-notifications.md new file mode 100644 index 0000000000..96edaf0c67 --- /dev/null +++ b/src/engage/campaigns/push-notifications.md @@ -0,0 +1,83 @@ +--- +title: Push Notifications +plan: engage-premier +--- + +This page walks you through the process of setting up mobile push notifications using Segment, Twilio, and Firebase/Apple Developer. + +## Before you begin + +Push notifications in Engage rely on several dependencies. This page provides a high-level overview of the steps required to set up these dependencies and links to the documentation you'll need to follow to complete setup and configuration. + +## Overview + +## 1. Set up analytics for push notifications + +Before you can send push notifications, you'll need to set up analytics to track user interactions. In this step, you'll integrate Segment's mobile SDK into your app. + +### Add the Segment base SDK + +This section outlines the process for adding Segment's base SDK to your app, including the Analytics Kotlin, Analytics Swift, and React Native libraries. + +#### Kotlin + +Follow these steps to integrate Analytics Kotlin: + +1. Create a source by navigating to **Connections > Sources > Add Source**. +2. Search for **Kotlin (Android)**, then click **Add source**. +3. Add the Analytics dependency to your `build.gradle` file. +4. Initialize and configure the client according to your requirements. +5. Add the following permissions to `AndroidManifest.xml`: + +```java + + + +``` + +For detailed instructions on integrating Analytics Kotlin, follow the steps in the [Analytics Kotlin getting started section](/docs/connections/sources/catalog/libraries/mobile/kotlin-android#getting-started). + + +#### Swift + +Follow these steps to integrate Analytics-Swift for iOS & Apple: + +1. Create a source by navigating to **Connections > Sources > Add Source**. +2. Search for **Apple**, then click **Add source**. +3. Add the Analytics dependency to your application using either Swift package manager or Xcode. +4. Initialize and configure the Analytics-Swift client. + +For detailed instructions on integrating Analytics-Swift, follow the steps in the [Analytics-Swift getting started section](/docs/connections/sources/catalog/libraries/mobile/apple#getting-started). + +#### React Native + +Follow these steps to integrate the React Native library: + +1. Create a source by navigating to **Connections > Sources > Add Source**. +2. Search for **React Native**, then click **Add source**. +3. Use yarn or npm to install `@segment/analytics-react-native`, `@segment/sovran-react-native` and `react-native-get-random-values`. +4. Initialize and configure the Analytics React Native client. + +For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). + +## Add the Engage SDK Plugin + +Next, you'll add the Engage SDK Plugin to your application. + +### Instructions for iOS + +These are the high-level steps required to add the Engage Plugin for iOS: + +1. Add the Engage SDK Plugin dependency in your `package.swift` file or using Xcode's Swift packages. +2. Add or modify the methods in the [Additional setup section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation. + +The previous steps are required. For detailed instructions on adding the Engage SDK Plugin for iOS, as well as for configuration options, follow the steps in the [getting started section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation on GitHub. + + +### Instructions for Android + +1. Follow the instructions in the [getting started section](https://github.com/segment-integrations/analytics-kotlin-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Destination documentation on GitHub. + + +## Configure Firecloud/Firebase or Apple Developer + From d9cdb0551b3e320a977f46a8a06922d8c94da541 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 18 Sep 2023 14:03:41 -0500 Subject: [PATCH 02/21] More onboarding updates --- src/engage/campaigns/push-notifications.md | 50 +++++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/src/engage/campaigns/push-notifications.md b/src/engage/campaigns/push-notifications.md index 96edaf0c67..2b2f9628ef 100644 --- a/src/engage/campaigns/push-notifications.md +++ b/src/engage/campaigns/push-notifications.md @@ -5,12 +5,18 @@ plan: engage-premier This page walks you through the process of setting up mobile push notifications using Segment, Twilio, and Firebase/Apple Developer. -## Before you begin - -Push notifications in Engage rely on several dependencies. This page provides a high-level overview of the steps required to set up these dependencies and links to the documentation you'll need to follow to complete setup and configuration. +> info "Before you begin" +> Push notifications in Engage rely on several dependencies. This page provides a high-level overview of the steps required to set up these dependencies and links to the documentation you'll need to follow to complete setup and configuration. ## Overview +You'll set up push notifications in four steps: + +1. [Set up analytics for push notifications](#1-set-up-analytics-for-push-notifications) +2. [Add the Engage SDK plugin](#2-add-the-engage-sdk-plugin) +3. [Configure push credentials](#3-configure-push-credentials) +4. [Configure push notifications in Engage](#4-configure-push-notifications-in-engage) + ## 1. Set up analytics for push notifications Before you can send push notifications, you'll need to set up analytics to track user interactions. In this step, you'll integrate Segment's mobile SDK into your app. @@ -60,7 +66,7 @@ Follow these steps to integrate the React Native library: For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). -## Add the Engage SDK Plugin +## 2. Add the Engage SDK Plugin Next, you'll add the Engage SDK Plugin to your application. @@ -71,13 +77,43 @@ These are the high-level steps required to add the Engage Plugin for iOS: 1. Add the Engage SDK Plugin dependency in your `package.swift` file or using Xcode's Swift packages. 2. Add or modify the methods in the [Additional setup section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation. -The previous steps are required. For detailed instructions on adding the Engage SDK Plugin for iOS, as well as for configuration options, follow the steps in the [getting started section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation on GitHub. +The previous steps are required. For detailed instructions on adding the Engage SDK Plugin for iOS, as well as for configuration options, follow the steps in the [getting started section](https://github.com/segment-integrations/analytics-swift-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Plugin documentation on GitHub. ### Instructions for Android -1. Follow the instructions in the [getting started section](https://github.com/segment-integrations/analytics-kotlin-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Destination documentation on GitHub. +Follow the instructions in the [getting started section](https://github.com/segment-integrations/analytics-kotlin-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Destination documentation on GitHub. + + +## 3. Configure push credentials + +In this step, you'll configure your iOS and Android push credentials for use with Twilio Notify and Twilio Notifications. + +### Configure iOS push notifications + +Follow the steps in Twilio's [How to Configure iOS Push Notifications documentation](https://www.twilio.com/docs/notify/configure-ios-push-notifications){:target="_blank"}. + +### Configure Android push notifications + +Follow the steps in Twilio's [Configuring Android Push Notifications](https://www.twilio.com/docs/notify/configure-android-push-notifications){:target="_blank"}. + +During Step 5, [Upload your API Key to Twilio](https://www.twilio.com/docs/notify/configure-android-push-notifications#step-5-upload-your-api-key-to-twilio){:target="_blank"}, follow these steps: + +1. In the Firebase console, click the **Cloud Messaging** tab. +2. Select the three dots menu next to **Cloud Messaging API (Legacy) Disabled**, then select **Manage API in Google Cloud Console**. A new window opens. +3. In the new Cloud Messaging window, select **Enable** +4. Return to the Firebase Cloud Messaging tab and refresh the page. +5. Cloud Messaging API (Legacy) is now enabled. Copy the server key; you'll need it later. + +With your server key copied, finish steps 5 and 6 in the Twilio documentation. + +## 4. Configure push notifications in Engage + +> success "" +> If you've already configured SMS services for Twilio Engage, you can skip this setp. +To set up push notifications in Twilio Engage and complete push notifications onboarding, follow the steps in the [Create and configure Twilio SMS services documentation](/docs/engage/onboarding/#stage-3-create-and-configure-twilio-sms-services). -## Configure Firecloud/Firebase or Apple Developer +## 5. Build a mobile push template +Now that you've completed push notifications setup, you're ready to [build a mobile push template](/docs/engage/content/mobile-push/). \ No newline at end of file From 72a7c965501e55d0afef40726d3a80ac3d81427b Mon Sep 17 00:00:00 2001 From: pwseg Date: Tue, 19 Sep 2023 10:19:08 -0500 Subject: [PATCH 03/21] Add template page and push notifications directory --- .../index.md} | 2 +- src/engage/content/mobile-push.md | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) rename src/engage/campaigns/{push-notifications.md => push-notifications/index.md} (99%) create mode 100644 src/engage/content/mobile-push.md diff --git a/src/engage/campaigns/push-notifications.md b/src/engage/campaigns/push-notifications/index.md similarity index 99% rename from src/engage/campaigns/push-notifications.md rename to src/engage/campaigns/push-notifications/index.md index 2b2f9628ef..75c2072ea8 100644 --- a/src/engage/campaigns/push-notifications.md +++ b/src/engage/campaigns/push-notifications/index.md @@ -1,5 +1,5 @@ --- -title: Push Notifications +title: Push Notifications Onboarding plan: engage-premier --- diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md new file mode 100644 index 0000000000..ebd061cfb0 --- /dev/null +++ b/src/engage/content/mobile-push.md @@ -0,0 +1,68 @@ +--- +title: Mobile Push Template +plan: engage-premier +--- + +Use Twilio Engage to build push notification templates to include throughout your marketing campaigns. + +## Push notification template types + +You can choose between two push notification template types: + +- **Media**, which contains media and text content +- **Text**, which contains text content + +## Build a push notification message template + +> info "" +> To build a push notification template in Engage, you must first [configure Engage for push notifications](/docs/engage/campaigns/push-notifications/). + +Follow these steps to build an push notification template: + +1. Navigate to **Engage > Content** and click **Create template**. +2. Select **Push**, then click **Configure**. +3. Enter a template name and select your template's language. +4. Select your template's content type, then click **Next**. + - For media templates, enter your message's title in the **Title** field, its body in the **Body** field, add the media URL, then add any desired [merge tags](#personalize-with-merge-tags). + - For text templates, enter your message's title in the **Title** field, its body in the **Body** field, then add any desired merge tags. +5. Select a [click behavior](#click-behaviors). +6. Click [Test](#test-your-mobile-push-template) or **Save** to save your template. + + +### Click behaviors + +When you build a push notification template, you can choose between three click behaviors, which determine what happens when a user taps on the mobile push: + +| Click behavior | Description | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Open app | Opens an app. You can specify a URL with or without merge tags to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | +| Open URL | Opens the specified URL. | +| Custom action | Takes any value as text input. Your app determines how to handle the value. For example, you could enter a custom action of `open_settings`, and then instruct your application to open the settings application when a user taps the notification and the notification arrives with `click behavior = open_settings`. | + +## Test your mobile push template + +> info "Push tokens" +> Push tokens are unique identifiers Segment associates with each profile. For push notifications, you'll need to configure identity resolution settings for the push tokens `ios.push_token` and `android.push_token`. Using the Profile explorer, you can find a profile's push tokens by opening a profile and then selecting the Identities tab. You can only send push notifications to profiles with push tokens enabled. + +Follow these steps to test your push notification: + + +1. Choose a template to test: + - For new templates, select **Test** once you've finished building a template. + - For existing templates, navigate to **Engage > Content > Push**, select the template you want to test, then click **Test**. +2. Choose a messaging service and add a recipient. + - You can add recipients either by either their email address or user ID. +3. Click **Send test push**. + +Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push notification doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. + +## Personalize with merge tags + +Personalize mobile push content in Engage using profile traits as merge tags in your messages. + +To personalize a push notification, click **Add merge tags** in the template builder and select the profile traits to include in your message. + +Engage inserts the selected traits inside merge tags based on cursor placement in the message. This allows you to personalize each push notification you send to recipients. You can also use [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the template editor. + +> info "" +> To learn more about profile traits, visit Segment's [Computed Traits](/docs/engage/audiences/computed-traits/) and [SQL Traits](/docs/engage/audiences/sql-traits/) documentation. \ No newline at end of file From 2b63a2bad7b045d07915e5779f1f2857563a3da5 Mon Sep 17 00:00:00 2001 From: pwseg Date: Tue, 19 Sep 2023 10:45:46 -0500 Subject: [PATCH 04/21] Clean up template page --- src/engage/content/mobile-push.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index ebd061cfb0..905267ac6f 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -15,9 +15,9 @@ You can choose between two push notification template types: ## Build a push notification message template > info "" -> To build a push notification template in Engage, you must first [configure Engage for push notifications](/docs/engage/campaigns/push-notifications/). +> To build push notification templates in Engage, first [configure Engage for push notifications](/docs/engage/campaigns/push-notifications/). -Follow these steps to build an push notification template: +Follow these steps to build a push notification template: 1. Navigate to **Engage > Content** and click **Create template**. 2. Select **Push**, then click **Configure**. @@ -33,11 +33,11 @@ Follow these steps to build an push notification template: When you build a push notification template, you can choose between three click behaviors, which determine what happens when a user taps on the mobile push: -| Click behavior | Description | -| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Open app | Opens an app. You can specify a URL with or without merge tags to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | -| Open URL | Opens the specified URL. | -| Custom action | Takes any value as text input. Your app determines how to handle the value. For example, you could enter a custom action of `open_settings`, and then instruct your application to open the settings application when a user taps the notification and the notification arrives with `click behavior = open_settings`. | +| Behavior | Description | +| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Open app | Opens an app. You can specify a URL with or without merge tags to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | +| Open URL | Opens the specified URL. | +| Custom action | Takes any value as text input. Your app determines how to handle the value. For example, you could enter a custom action of `open_settings`, and then instruct your application to open the settings application when a user taps the notification and the notification arrives with `click behavior = open_settings`. | ## Test your mobile push template @@ -51,7 +51,7 @@ Follow these steps to test your push notification: - For new templates, select **Test** once you've finished building a template. - For existing templates, navigate to **Engage > Content > Push**, select the template you want to test, then click **Test**. 2. Choose a messaging service and add a recipient. - - You can add recipients either by either their email address or user ID. + - You can add recipients using an email address or user ID. 3. Click **Send test push**. Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push notification doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. From 0ee66faa44153ec78d695c2461ebe5a77fca4f35 Mon Sep 17 00:00:00 2001 From: pwseg Date: Tue, 19 Sep 2023 11:17:18 -0500 Subject: [PATCH 05/21] Add mobile push campaigns page --- .../push-notifications/push-campaigns.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/engage/campaigns/push-notifications/push-campaigns.md diff --git a/src/engage/campaigns/push-notifications/push-campaigns.md b/src/engage/campaigns/push-notifications/push-campaigns.md new file mode 100644 index 0000000000..1fa58089f1 --- /dev/null +++ b/src/engage/campaigns/push-notifications/push-campaigns.md @@ -0,0 +1,65 @@ +--- +title: Push Notification Campaigns +plan: engage-premier +--- + +With Twilio Engage, you can send campaigns to users who have opted in to receive your marketing materials. On this page, you’ll learn how to create and send a mobile push campaign. + +Some knowledge of the Journeys product will benefit you as you read through this guide. If you’re new to Journeys, the [Journeys documentation](/docs/personas/journeys/) will bring you up to speed. + +## How Engage campaigns work + +Twilio Engage uses Journeys to campaigns. With Journeys, you add conditions and steps that trigger actions like sending an email, an SMS, or a push notification. + +You’ll build and then send your campaign in three stages: + +1. Create a journey. +2. Add a journey condition. +3. Create, test, and publish your mobile push campaign. + +### Create a journey + +Because Engage campaigns exist within Journeys, begin by creating a journey: + +1. In Engage, select **Journeys**, then click **New Journey**. +2. Name your journey and select its entry settings. +3. Click **Build Journey** to create the Journey. + +### Add a Journey condition + +With your Journey created, you’ll now create a [condition](/docs/engage/journeys/step-types/) that will trigger your campaign: + +1. Within the Journey builder, click **+ Add Entry Condition**. +2. In the Add Entry Condition pane, give the step a name. +3. Click **+ Add Condition**, select your desired condition, then click **Save**. + +With your entry condition added, you’re now ready to create your mobile push campaign. + +### Create, test, and publish your mobile push campaign + +Follow these steps to create a mobile push campaign: + +1. Within the Journey builder, click the **+** node below your new condition. +2. From the **Add step** window, click **Send a Push**. +3. In the **Send a Push** window, select the mobile push template you want to use, or click **Create new template** to [build a new template](/docs/engage/content/mobile-push/). +4. Review your template's content and click behavior, then click [Test](#test-your-mobile-push-template) or **Continue**. +5. In the **Send a Push** modal, give the step a name, choose a messaging service, add any conversion goals, then click **Save**. +6. In the Journey builder, click **Publish**. + +Your mobile push campaign is now live. Users who trigger the mobile push step’s parent Journey condition will receive your campaign. + +## Test your mobile push template + +> info "Push tokens" +> Push tokens are unique identifiers Segment associates with each profile. For push notifications, you'll need to configure identity resolution settings for the push tokens `ios.push_token` and `android.push_token`. Using the Profile explorer, you can find a profile's push tokens by opening a profile and then selecting the Identities tab. You can only send push notifications to profiles with push tokens enabled. + +Follow these steps to test your push notification: + +1. Choose a template to test: + - For new templates, select **Test** once you've finished building a template. + - For existing templates, navigate to **Engage > Content > Push**, select the template you want to test, then click **Test**. +2. Choose a messaging service and add a recipient. + - You can add recipients using an email address or user ID. +3. Click **Send test push**. + +Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push notification doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. From d2870d8e5e050720b4881c3da3cacdfddb757383 Mon Sep 17 00:00:00 2001 From: pwseg Date: Tue, 19 Sep 2023 11:55:14 -0500 Subject: [PATCH 06/21] Onboarding page cleanup --- .../campaigns/push-notifications/index.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/engage/campaigns/push-notifications/index.md b/src/engage/campaigns/push-notifications/index.md index 75c2072ea8..b3ca2b0304 100644 --- a/src/engage/campaigns/push-notifications/index.md +++ b/src/engage/campaigns/push-notifications/index.md @@ -12,18 +12,18 @@ This page walks you through the process of setting up mobile push notifications You'll set up push notifications in four steps: -1. [Set up analytics for push notifications](#1-set-up-analytics-for-push-notifications) -2. [Add the Engage SDK plugin](#2-add-the-engage-sdk-plugin) -3. [Configure push credentials](#3-configure-push-credentials) -4. [Configure push notifications in Engage](#4-configure-push-notifications-in-engage) +1. [Set up analytics for push notifications](#1-set-up-analytics-for-push-notifications). +2. [Add the Engage SDK plugin](#2-add-the-engage-sdk-plugin). +3. [Configure push credentials](#3-configure-push-credentials). +4. [Configure push notifications in Engage](#4-configure-push-notifications-in-engage). ## 1. Set up analytics for push notifications -Before you can send push notifications, you'll need to set up analytics to track user interactions. In this step, you'll integrate Segment's mobile SDK into your app. +Before you can send push notifications, you'll need to set up analytics. In this step, you'll integrate Segment's mobile SDK into your app. ### Add the Segment base SDK -This section outlines the process for adding Segment's base SDK to your app, including the Analytics Kotlin, Analytics Swift, and React Native libraries. +This section outlines the process for adding Segment's base SDK to your app, including the Analytics Kotlin, Analytics-Swift, and React Native libraries. #### Kotlin @@ -64,7 +64,7 @@ Follow these steps to integrate the React Native library: 3. Use yarn or npm to install `@segment/analytics-react-native`, `@segment/sovran-react-native` and `react-native-get-random-values`. 4. Initialize and configure the Analytics React Native client. -For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). +For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native getting started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). ## 2. Add the Engage SDK Plugin @@ -93,7 +93,7 @@ In this step, you'll configure your iOS and Android push credentials for use wit Follow the steps in Twilio's [How to Configure iOS Push Notifications documentation](https://www.twilio.com/docs/notify/configure-ios-push-notifications){:target="_blank"}. -### Configure Android push notifications +### Configure Android push notifications Follow the steps in Twilio's [Configuring Android Push Notifications](https://www.twilio.com/docs/notify/configure-android-push-notifications){:target="_blank"}. @@ -101,7 +101,7 @@ During Step 5, [Upload your API Key to Twilio](https://www.twilio.com/docs/notif 1. In the Firebase console, click the **Cloud Messaging** tab. 2. Select the three dots menu next to **Cloud Messaging API (Legacy) Disabled**, then select **Manage API in Google Cloud Console**. A new window opens. -3. In the new Cloud Messaging window, select **Enable** +3. In the new Cloud Messaging window, select **Enable**. 4. Return to the Firebase Cloud Messaging tab and refresh the page. 5. Cloud Messaging API (Legacy) is now enabled. Copy the server key; you'll need it later. From b8b53739a7adf747143b4ec7cc0ef4ca0590b1bc Mon Sep 17 00:00:00 2001 From: pwseg Date: Tue, 19 Sep 2023 11:59:18 -0500 Subject: [PATCH 07/21] Campaigns page cleanup [netlify-build] --- src/engage/content/mobile-push.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 905267ac6f..4baa0ed4a2 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -65,4 +65,8 @@ To personalize a push notification, click **Add merge tags** in the template bui Engage inserts the selected traits inside merge tags based on cursor placement in the message. This allows you to personalize each push notification you send to recipients. You can also use [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the template editor. > info "" -> To learn more about profile traits, visit Segment's [Computed Traits](/docs/engage/audiences/computed-traits/) and [SQL Traits](/docs/engage/audiences/sql-traits/) documentation. \ No newline at end of file +> To learn more about profile traits, visit Segment's [Computed Traits](/docs/engage/audiences/computed-traits/) and [SQL Traits](/docs/engage/audiences/sql-traits/) documentation. + +## Next steps + +Now that you've built a mobile push template, you're ready to begin [sending mobile push campaigns](/docs/engage/campaigns/push-notifications/push-campaigns/). \ No newline at end of file From c5f972e04b835ae5acb38a13e6ebcac8a30411f3 Mon Sep 17 00:00:00 2001 From: pwseg Date: Tue, 19 Sep 2023 12:06:41 -0500 Subject: [PATCH 08/21] Fix typo --- src/engage/campaigns/push-notifications/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engage/campaigns/push-notifications/index.md b/src/engage/campaigns/push-notifications/index.md index b3ca2b0304..b29d55bb7d 100644 --- a/src/engage/campaigns/push-notifications/index.md +++ b/src/engage/campaigns/push-notifications/index.md @@ -110,7 +110,7 @@ With your server key copied, finish steps 5 and 6 in the Twilio documentation. ## 4. Configure push notifications in Engage > success "" -> If you've already configured SMS services for Twilio Engage, you can skip this setp. +> If you've already configured SMS services for Twilio Engage, you can skip this step. To set up push notifications in Twilio Engage and complete push notifications onboarding, follow the steps in the [Create and configure Twilio SMS services documentation](/docs/engage/onboarding/#stage-3-create-and-configure-twilio-sms-services). From 60160109fc8fbbd03c88c6ff9052ac99acb7836b Mon Sep 17 00:00:00 2001 From: pwseg Date: Fri, 22 Sep 2023 17:38:13 -0500 Subject: [PATCH 09/21] Update paths --- src/engage/campaigns/{push-notifications => mobile-push}/index.md | 0 .../{push-notifications => mobile-push}/push-campaigns.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/engage/campaigns/{push-notifications => mobile-push}/index.md (100%) rename src/engage/campaigns/{push-notifications => mobile-push}/push-campaigns.md (100%) diff --git a/src/engage/campaigns/push-notifications/index.md b/src/engage/campaigns/mobile-push/index.md similarity index 100% rename from src/engage/campaigns/push-notifications/index.md rename to src/engage/campaigns/mobile-push/index.md diff --git a/src/engage/campaigns/push-notifications/push-campaigns.md b/src/engage/campaigns/mobile-push/push-campaigns.md similarity index 100% rename from src/engage/campaigns/push-notifications/push-campaigns.md rename to src/engage/campaigns/mobile-push/push-campaigns.md From d7a1a887e8252f5d0c973d9fe7b15c8f900a9e00 Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 17:35:03 -0500 Subject: [PATCH 10/21] Add detailed instructions for Engage SDK plugin --- src/engage/campaigns/mobile-push/index.md | 161 ++++++++++++++++++++-- 1 file changed, 149 insertions(+), 12 deletions(-) diff --git a/src/engage/campaigns/mobile-push/index.md b/src/engage/campaigns/mobile-push/index.md index b29d55bb7d..5526eb9230 100644 --- a/src/engage/campaigns/mobile-push/index.md +++ b/src/engage/campaigns/mobile-push/index.md @@ -1,23 +1,23 @@ --- -title: Push Notifications Onboarding +title: Mobile Push Onboarding plan: engage-premier --- This page walks you through the process of setting up mobile push notifications using Segment, Twilio, and Firebase/Apple Developer. -> info "Before you begin" -> Push notifications in Engage rely on several dependencies. This page provides a high-level overview of the steps required to set up these dependencies and links to the documentation you'll need to follow to complete setup and configuration. +> info "Prerequisites" +> This guide assumes familiarity with Swift and Kotlin and is intended for a developer audience. ## Overview You'll set up push notifications in four steps: -1. [Set up analytics for push notifications](#1-set-up-analytics-for-push-notifications). +1. [Set up analytics for mobile push](#1-set-up-analytics-for-mobile-push). 2. [Add the Engage SDK plugin](#2-add-the-engage-sdk-plugin). 3. [Configure push credentials](#3-configure-push-credentials). 4. [Configure push notifications in Engage](#4-configure-push-notifications-in-engage). -## 1. Set up analytics for push notifications +## 1. Set up analytics for mobile push Before you can send push notifications, you'll need to set up analytics. In this step, you'll integrate Segment's mobile SDK into your app. @@ -66,24 +66,161 @@ Follow these steps to integrate the React Native library: For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native getting started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). -## 2. Add the Engage SDK Plugin +## 2. Add the Engage SDK plugin -Next, you'll add the Engage SDK Plugin to your application. +Next, you'll add the Engage SDK plugins for both iOS and Android to your application. ### Instructions for iOS -These are the high-level steps required to add the Engage Plugin for iOS: +Now that you've integrated Analytics-Swift, follow the steps in this section to add the Engage Plugin for iOS. -1. Add the Engage SDK Plugin dependency in your `package.swift` file or using Xcode's Swift packages. -2. Add or modify the methods in the [Additional setup section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation. +#### 2a. Add the Engage SDK plugin dependency -The previous steps are required. For detailed instructions on adding the Engage SDK Plugin for iOS, as well as for configuration options, follow the steps in the [getting started section](https://github.com/segment-integrations/analytics-swift-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Plugin documentation on GitHub. +You can add the Engage SDK plugin using either Xcode or `Package.swift`. +**Instructions for adding the plugin with Xcode** + +1. In the Xcode `File` menu, click **Add Packages**. +2. In the Swift packages search dialog, enter the following URL: + + ``` + https://github.com/segment-integrations/analytics-swift-engage + ``` + +3. You'll then have the option to pin to a version or a specific branch, as well as to the project in your workspace. Once you've made your selections, click `Add Package`. + +**Instructions for adding the plugin with `Package.swift`** + +1. Open the `Package.swift` file and add the following to the `dependencies` section: + +``` +.package( + name: "Segment", + url: "https://github.com/segment-integrations/analytics-swift-engage.git", + from: "1.1.2" + ), +``` + +#### 2b. Import the plugin + +1. Import the plugin in the file where you configure your Analytics instance: + + ``` + import Segment + import TwilioEngage // <-- Add this line. + ``` + +2. After your Analytics-Swift library setup, call `analytics.add(plugin: ...)` to add an instance of the plugin to the Analytics timeline: + + ``` + let analytics = Analytics(configuration: Configuration(writeKey: "") + .flushAt(3) + .trackApplicationLifecycleEvents(true)) + + let engage = TwilioEngage { previous, current in + print("Push Status Changed /(current)") + } + + analytics.add(plugin: engage) + ``` + +3. Add or modify methods to `AppDelegate`: + +To start receiving and handling push notifications, add or modify the following methods in your `AppDelegate`: + +```swift + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + + //Add the following: + + let center = UNUserNotificationCenter.current() + center.delegate = self + center.requestAuthorization(options: [.sound, .alert, .badge]) { (granted, error) in + guard granted else { + Analytics.main.declinedRemoteNotifications() + Tab1ViewController.addPush(s: "User Declined Notifications") + return + } + DispatchQueue.main.async { + UIApplication.shared.registerForRemoteNotifications() + } + } + + // The following conditional statement is necessary to handle remote notifications in older versions of iOS. + if let notification = launchOptions?[UIApplication.LaunchOptionsKey.remoteNotification] as? [String: Codable] { + Tab1ViewController.addPush(s: "App Launched via Notification \(notification)") + Analytics.main.receivedRemoteNotification(userInfo: notification) + } + + ... + + return true +} + +func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + // Segment event to register for remote notifications + Analytics.main.registeredForRemoteNotifications(deviceToken: deviceToken) +} + +func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { + // Segment event for failure to register for remote notifications + Analytics.main.failedToRegisterForRemoteNotification(error: error) +} + +func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult { + // Segment event for receiving a remote notification + Analytics.main.receivedRemoteNotification(userInfo: userInfo) + + // TODO: Customize notification handling based on the received userInfo. + // Implement actions or UI updates based on the notification content. + + return .noData +} + +func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse) async { + let userInfo = response.notification.request.content.userInfo + //Segment event for receiving a remote notification + Analytics.main.receivedRemoteNotification(userInfo: userInfo) + + // TODO: Customize notification response handling based on the received userInfo. + // Implement actions based on the user's response to the notification. + // Example: Navigate to a specific screen or perform an action based on the notification. + +} +``` + +The previous steps are required. For configuration options, including subscription statuses and media handling, visit the [getting started section](https://github.com/segment-integrations/analytics-swift-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Plugin documentation on GitHub. ### Instructions for Android -Follow the instructions in the [getting started section](https://github.com/segment-integrations/analytics-kotlin-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Destination documentation on GitHub. +Now that you've integrated Analytics for Kotlin, follow these steps to add the Engage Plugin for Android: + +1. Add the following to your Gradle dependencies: + + ```groovy + implementation 'com.segment.analytics.kotlin.destinations:engage:' + ``` + +2. Add the following service to the `application` tag of your `AndroidManifest.xml` file: + + ```xml + + + + + + + ``` + +3. Add this plugin to your Analytics instance: + + ```kotlin + analytics.add(TwilioEngage(applicationContext)) + ``` +The previous steps are required. For configuration options, including subscription statuses and customized actions, visit the [getting started section](https://github.com/segment-integrations/analytics-kotlin-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Destination documentation on GitHub. ## 3. Configure push credentials From 58d80dd233f4f8f4eff622f04bc7e8d01b9447fb Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 18:52:04 -0500 Subject: [PATCH 11/21] Update Step 4 instructions --- src/engage/campaigns/mobile-push/index.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/engage/campaigns/mobile-push/index.md b/src/engage/campaigns/mobile-push/index.md index 5526eb9230..9ec32342ed 100644 --- a/src/engage/campaigns/mobile-push/index.md +++ b/src/engage/campaigns/mobile-push/index.md @@ -10,16 +10,16 @@ This page walks you through the process of setting up mobile push notifications ## Overview -You'll set up push notifications in four steps: +You'll set up mobile push in four steps: 1. [Set up analytics for mobile push](#1-set-up-analytics-for-mobile-push). 2. [Add the Engage SDK plugin](#2-add-the-engage-sdk-plugin). 3. [Configure push credentials](#3-configure-push-credentials). -4. [Configure push notifications in Engage](#4-configure-push-notifications-in-engage). +4. [Configure mobile push in Engage](#4-configure-mobile-push-in-engage). ## 1. Set up analytics for mobile push -Before you can send push notifications, you'll need to set up analytics. In this step, you'll integrate Segment's mobile SDK into your app. +Before you can send mobile pushes, you'll need to set up analytics. In this step, you'll integrate Segment's mobile SDK into your app. ### Add the Segment base SDK @@ -126,7 +126,7 @@ You can add the Engage SDK plugin using either Xcode or `Package.swift`. 3. Add or modify methods to `AppDelegate`: -To start receiving and handling push notifications, add or modify the following methods in your `AppDelegate`: +To start receiving and handling mobile push notifications, add or modify the following methods in your `AppDelegate`: ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { @@ -185,7 +185,7 @@ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive respo // TODO: Customize notification response handling based on the received userInfo. // Implement actions based on the user's response to the notification. // Example: Navigate to a specific screen or perform an action based on the notification. - + } ``` @@ -244,13 +244,20 @@ During Step 5, [Upload your API Key to Twilio](https://www.twilio.com/docs/notif With your server key copied, finish steps 5 and 6 in the Twilio documentation. -## 4. Configure push notifications in Engage +## 4. Configure mobile push in Engage > success "" > If you've already configured SMS services for Twilio Engage, you can skip this step. -To set up push notifications in Twilio Engage and complete push notifications onboarding, follow the steps in the [Create and configure Twilio SMS services documentation](/docs/engage/onboarding/#stage-3-create-and-configure-twilio-sms-services). +Follow these steps to set up mobile push in Twilio Engage and complete mobile onboarding: + +1. Follow the steps in the [Create and configure Twilio SMS services documentation](/docs/engage/onboarding/#stage-3-create-and-configure-twilio-sms-services). +2. Return to your Segment workspace and navigate to **Engage > Engage settings**. +3. Click the pencil icon next to **Messaging services**, then click **Create new push service**. + - If you don't see the pencil icon, select **Create new push service**. +4. Name the push service, select or create APN and FCM credentials, then click **Create Push Service**. +5. Your new messaging service appears in the **Add messaging services** dropdown. Select it, then click **Save**. ## 5. Build a mobile push template -Now that you've completed push notifications setup, you're ready to [build a mobile push template](/docs/engage/content/mobile-push/). \ No newline at end of file +Now that you've completed mobile push setup, you're ready to [build a mobile push template](/docs/engage/content/mobile-push/). \ No newline at end of file From d831facdaa0d917ec7e04d42f4b61cd53dbc70fa Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 19:02:25 -0500 Subject: [PATCH 12/21] Update terminology --- .../campaigns/mobile-push/push-campaigns.md | 10 +++--- src/engage/content/mobile-push.md | 36 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/engage/campaigns/mobile-push/push-campaigns.md b/src/engage/campaigns/mobile-push/push-campaigns.md index 1fa58089f1..0d63a165fe 100644 --- a/src/engage/campaigns/mobile-push/push-campaigns.md +++ b/src/engage/campaigns/mobile-push/push-campaigns.md @@ -1,5 +1,5 @@ --- -title: Push Notification Campaigns +title: Mobile Push Campaigns plan: engage-premier --- @@ -9,7 +9,7 @@ Some knowledge of the Journeys product will benefit you as you read through this ## How Engage campaigns work -Twilio Engage uses Journeys to campaigns. With Journeys, you add conditions and steps that trigger actions like sending an email, an SMS, or a push notification. +Twilio Engage uses Journeys to campaigns. With Journeys, you add conditions and steps that trigger actions like sending an email, an SMS, or a mobile push. You’ll build and then send your campaign in three stages: @@ -51,9 +51,9 @@ Your mobile push campaign is now live. Users who trigger the mobile push step’ ## Test your mobile push template > info "Push tokens" -> Push tokens are unique identifiers Segment associates with each profile. For push notifications, you'll need to configure identity resolution settings for the push tokens `ios.push_token` and `android.push_token`. Using the Profile explorer, you can find a profile's push tokens by opening a profile and then selecting the Identities tab. You can only send push notifications to profiles with push tokens enabled. +> Push tokens are unique identifiers Segment associates with each profile. For mobile push, you'll need to configure identity resolution settings for the push tokens `ios.push_token` and `android.push_token`. Using the Profile explorer, you can find a profile's push tokens by opening a profile and then selecting the Identities tab. You can only send mobile pushes to profiles with push tokens enabled. -Follow these steps to test your push notification: +Follow these steps to test your mobile push: 1. Choose a template to test: - For new templates, select **Test** once you've finished building a template. @@ -62,4 +62,4 @@ Follow these steps to test your push notification: - You can add recipients using an email address or user ID. 3. Click **Send test push**. -Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push notification doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. +Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 4baa0ed4a2..3036080a21 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -3,21 +3,21 @@ title: Mobile Push Template plan: engage-premier --- -Use Twilio Engage to build push notification templates to include throughout your marketing campaigns. +Use Twilio Engage to build mobile push templates to include throughout your marketing campaigns. -## Push notification template types +## Mobile push template types -You can choose between two push notification template types: +You can choose between two mobile push template types: - **Media**, which contains media and text content - **Text**, which contains text content -## Build a push notification message template +## Build a mobile push message template > info "" -> To build push notification templates in Engage, first [configure Engage for push notifications](/docs/engage/campaigns/push-notifications/). +> To build mobile push templates in Engage, first [configure Engage for mobile](/docs/engage/campaigns/mobile-push/). -Follow these steps to build a push notification template: +Follow these steps to build a mobile push template: 1. Navigate to **Engage > Content** and click **Create template**. 2. Select **Push**, then click **Configure**. @@ -31,20 +31,20 @@ Follow these steps to build a push notification template: ### Click behaviors -When you build a push notification template, you can choose between three click behaviors, which determine what happens when a user taps on the mobile push: +When you build a mobile push template, you can choose between three click behaviors, which determine what happens when a user taps on the mobile push: -| Behavior | Description | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Open app | Opens an app. You can specify a URL with or without merge tags to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | -| Open URL | Opens the specified URL. | -| Custom action | Takes any value as text input. Your app determines how to handle the value. For example, you could enter a custom action of `open_settings`, and then instruct your application to open the settings application when a user taps the notification and the notification arrives with `click behavior = open_settings`. | +| Behavior | Description | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Open app | Opens an app. You can specify a URL with or without merge tags to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | +| Open URL | Opens the specified URL. | +| Custom action | Takes any value as text input. Your app determines how to handle the value. For example, you could enter a custom action of `open_settings`, and then instruct your application to open the settings application when a user taps the push and the push arrives with `click behavior = open_settings`. | ## Test your mobile push template > info "Push tokens" -> Push tokens are unique identifiers Segment associates with each profile. For push notifications, you'll need to configure identity resolution settings for the push tokens `ios.push_token` and `android.push_token`. Using the Profile explorer, you can find a profile's push tokens by opening a profile and then selecting the Identities tab. You can only send push notifications to profiles with push tokens enabled. +> Push tokens are unique identifiers Segment associates with each profile. For mobile push, you'll need to configure identity resolution settings for the push tokens `ios.push_token` and `android.push_token`. Using the Profile explorer, you can find a profile's push tokens by opening a profile and then selecting the Identities tab. You can only send mobile pushes to profiles with push tokens enabled. -Follow these steps to test your push notification: +Follow these steps to test your mobile push: 1. Choose a template to test: @@ -54,19 +54,19 @@ Follow these steps to test your push notification: - You can add recipients using an email address or user ID. 3. Click **Send test push**. -Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push notification doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. +Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test mobile push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. ## Personalize with merge tags Personalize mobile push content in Engage using profile traits as merge tags in your messages. -To personalize a push notification, click **Add merge tags** in the template builder and select the profile traits to include in your message. +To personalize a mobile push, click **Add merge tags** in the template builder and select the profile traits to include in your message. -Engage inserts the selected traits inside merge tags based on cursor placement in the message. This allows you to personalize each push notification you send to recipients. You can also use [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the template editor. +Engage inserts the selected traits inside merge tags based on cursor placement in the message. This allows you to personalize each mobile push you send to recipients. You can also use [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the template editor. > info "" > To learn more about profile traits, visit Segment's [Computed Traits](/docs/engage/audiences/computed-traits/) and [SQL Traits](/docs/engage/audiences/sql-traits/) documentation. ## Next steps -Now that you've built a mobile push template, you're ready to begin [sending mobile push campaigns](/docs/engage/campaigns/push-notifications/push-campaigns/). \ No newline at end of file +Now that you've built a mobile push template, you're ready to begin [sending mobile push campaigns](/docs/engage/campaigns/mobile-push/push-campaigns/). \ No newline at end of file From ecd2c5d6f314196ed03372c7377b34a750792895 Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 19:09:32 -0500 Subject: [PATCH 13/21] Add content size limit note --- src/engage/campaigns/mobile-push/push-campaigns.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engage/campaigns/mobile-push/push-campaigns.md b/src/engage/campaigns/mobile-push/push-campaigns.md index 0d63a165fe..2ffb0b0b30 100644 --- a/src/engage/campaigns/mobile-push/push-campaigns.md +++ b/src/engage/campaigns/mobile-push/push-campaigns.md @@ -58,6 +58,7 @@ Follow these steps to test your mobile push: 1. Choose a template to test: - For new templates, select **Test** once you've finished building a template. - For existing templates, navigate to **Engage > Content > Push**, select the template you want to test, then click **Test**. + - Mobile push templates have a content size limit of 4KB. 2. Choose a messaging service and add a recipient. - You can add recipients using an email address or user ID. 3. Click **Send test push**. From 10ef77e669495dd0638b3ea95752b9b7b09697d2 Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 19:38:01 -0500 Subject: [PATCH 14/21] Update sidenav --- src/_data/sidenav/main.yml | 9 +++++++++ src/engage/content/mobile-push.md | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/_data/sidenav/main.yml b/src/_data/sidenav/main.yml index 6d48c34098..39c5c5176c 100644 --- a/src/_data/sidenav/main.yml +++ b/src/_data/sidenav/main.yml @@ -435,6 +435,8 @@ sections: title: SMS Template - path: '/engage/content/whatsapp' title: WhatsApp Template + - path: '/engage/content/mobile-push' + title: Mobile Push Template - section_title: Campaigns description: "Create multi-channel campaigns to get the right message to your users." section: @@ -448,6 +450,13 @@ sections: title: Broadcasts - path: '/engage/campaigns/whatsapp-campaigns' title: WhatsApp Campaigns + - section_title: Mobile Push + slug: /engage/campaigns/mobile-push + section: + - path: /engage/campaigns/mobile-push + title: Mobile Push Onboarding + - path: /engage/campaigns/mobile-push/push-campaigns + title: Mobile Push Campaigns - section_title: Trait Activation slug: engage/trait-activation section: diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 3036080a21..d744263f5e 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -46,7 +46,6 @@ When you build a mobile push template, you can choose between three click behavi Follow these steps to test your mobile push: - 1. Choose a template to test: - For new templates, select **Test** once you've finished building a template. - For existing templates, navigate to **Engage > Content > Push**, select the template you want to test, then click **Test**. From 06a3b6f67062a1af1f55f922b2abdf5252a1ed65 Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 19:39:04 -0500 Subject: [PATCH 15/21] [netlify-build] --- src/engage/content/mobile-push.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index d744263f5e..73ffe2007a 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -68,4 +68,4 @@ Engage inserts the selected traits inside merge tags based on cursor placement i ## Next steps -Now that you've built a mobile push template, you're ready to begin [sending mobile push campaigns](/docs/engage/campaigns/mobile-push/push-campaigns/). \ No newline at end of file +Now that you've built a mobile push template, you're ready to begin [sending mobile push campaigns](/docs/engage/campaigns/mobile-push/push-campaigns/). \ No newline at end of file From 24b69c39e4f2635b9056473caf54f2f796e4e2a4 Mon Sep 17 00:00:00 2001 From: pwseg Date: Sun, 24 Sep 2023 20:16:18 -0500 Subject: [PATCH 16/21] Fix some typos --- src/engage/campaigns/mobile-push/index.md | 8 +++----- src/engage/campaigns/mobile-push/push-campaigns.md | 6 +++--- src/engage/content/mobile-push.md | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/engage/campaigns/mobile-push/index.md b/src/engage/campaigns/mobile-push/index.md index 9ec32342ed..64645f0981 100644 --- a/src/engage/campaigns/mobile-push/index.md +++ b/src/engage/campaigns/mobile-push/index.md @@ -10,7 +10,7 @@ This page walks you through the process of setting up mobile push notifications ## Overview -You'll set up mobile push in four steps: +You'll set up mobile push in four stages: 1. [Set up analytics for mobile push](#1-set-up-analytics-for-mobile-push). 2. [Add the Engage SDK plugin](#2-add-the-engage-sdk-plugin). @@ -124,9 +124,7 @@ You can add the Engage SDK plugin using either Xcode or `Package.swift`. analytics.add(plugin: engage) ``` -3. Add or modify methods to `AppDelegate`: - -To start receiving and handling mobile push notifications, add or modify the following methods in your `AppDelegate`: +3. To start receiving and handling mobile push notifications, add or modify the following methods in your `AppDelegate`: ```swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { @@ -249,7 +247,7 @@ With your server key copied, finish steps 5 and 6 in the Twilio documentation. > success "" > If you've already configured SMS services for Twilio Engage, you can skip this step. -Follow these steps to set up mobile push in Twilio Engage and complete mobile onboarding: +Follow these steps to set up mobile push in Twilio Engage and complete mobile push onboarding: 1. Follow the steps in the [Create and configure Twilio SMS services documentation](/docs/engage/onboarding/#stage-3-create-and-configure-twilio-sms-services). 2. Return to your Segment workspace and navigate to **Engage > Engage settings**. diff --git a/src/engage/campaigns/mobile-push/push-campaigns.md b/src/engage/campaigns/mobile-push/push-campaigns.md index 2ffb0b0b30..62b456d866 100644 --- a/src/engage/campaigns/mobile-push/push-campaigns.md +++ b/src/engage/campaigns/mobile-push/push-campaigns.md @@ -9,7 +9,7 @@ Some knowledge of the Journeys product will benefit you as you read through this ## How Engage campaigns work -Twilio Engage uses Journeys to campaigns. With Journeys, you add conditions and steps that trigger actions like sending an email, an SMS, or a mobile push. +Twilio Engage uses Journeys to send campaigns. With Journeys, you add conditions and steps that trigger actions like sending an email, an SMS, or a mobile push. You’ll build and then send your campaign in three stages: @@ -23,7 +23,7 @@ Because Engage campaigns exist within Journeys, begin by creating a journey: 1. In Engage, select **Journeys**, then click **New Journey**. 2. Name your journey and select its entry settings. -3. Click **Build Journey** to create the Journey. +3. Click **Build Journey** to create the journey. ### Add a Journey condition @@ -63,4 +63,4 @@ Follow these steps to test your mobile push: - You can add recipients using an email address or user ID. 3. Click **Send test push**. -Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. +Segment verifies that the profile you're sending a test to has push tokens enabled, then sends the test. If the test push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 73ffe2007a..98c830e996 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -49,11 +49,12 @@ Follow these steps to test your mobile push: 1. Choose a template to test: - For new templates, select **Test** once you've finished building a template. - For existing templates, navigate to **Engage > Content > Push**, select the template you want to test, then click **Test**. + - Mobile push templates have a content size limit of 4KB. 2. Choose a messaging service and add a recipient. - You can add recipients using an email address or user ID. 3. Click **Send test push**. -Segment verifies that the the profile you're sending a test to has push tokens enabled, then sends the test. If the test mobile push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. +Segment verifies that the profile you're sending a test to has push tokens enabled, then sends the test. If the test mobile push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. ## Personalize with merge tags From 1a51850bc29eacfc79d9d8928f6a7dbcfeeb7082 Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 25 Sep 2023 10:21:49 -0500 Subject: [PATCH 17/21] Clarify push token advice --- src/engage/campaigns/mobile-push/push-campaigns.md | 2 +- src/engage/content/mobile-push.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engage/campaigns/mobile-push/push-campaigns.md b/src/engage/campaigns/mobile-push/push-campaigns.md index 62b456d866..af00ecb1f6 100644 --- a/src/engage/campaigns/mobile-push/push-campaigns.md +++ b/src/engage/campaigns/mobile-push/push-campaigns.md @@ -63,4 +63,4 @@ Follow these steps to test your mobile push: - You can add recipients using an email address or user ID. 3. Click **Send test push**. -Segment verifies that the profile you're sending a test to has push tokens enabled, then sends the test. If the test push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. +Segment verifies that the profile you're sending a test to has a push token, then sends the test. If the test mobile push doesn't work as expected, confirm that the profile you're sending to has a push token. diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 98c830e996..3463d1424d 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -54,7 +54,7 @@ Follow these steps to test your mobile push: - You can add recipients using an email address or user ID. 3. Click **Send test push**. -Segment verifies that the profile you're sending a test to has push tokens enabled, then sends the test. If the test mobile push doesn't work as expected, confirm that the profile you're sending to has enabled push tokens. +Segment verifies that the profile you're sending a test to has a push token, then sends the test. If the test mobile push doesn't work as expected, confirm that the profile you're sending to has a push token. ## Personalize with merge tags From ce489eaad19827517fb2cd479900c05973aba69b Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 25 Sep 2023 16:14:08 -0500 Subject: [PATCH 18/21] Add note about the Application class --- src/engage/campaigns/mobile-push/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engage/campaigns/mobile-push/index.md b/src/engage/campaigns/mobile-push/index.md index 64645f0981..98eb6465a2 100644 --- a/src/engage/campaigns/mobile-push/index.md +++ b/src/engage/campaigns/mobile-push/index.md @@ -27,6 +27,9 @@ This section outlines the process for adding Segment's base SDK to your app, inc #### Kotlin +> info "" +> You must initialize your Analytics instance in the Application class, otherwise you may experience issues with customization and delivery confirmation. + Follow these steps to integrate Analytics Kotlin: 1. Create a source by navigating to **Connections > Sources > Add Source**. From 36a4ac30ad74a9e9620e7e06faab7b3897fb442b Mon Sep 17 00:00:00 2001 From: pwseg Date: Mon, 25 Sep 2023 18:00:22 -0500 Subject: [PATCH 19/21] A few more small updates --- src/engage/campaigns/mobile-push/index.md | 25 +++++++++++++++++++---- src/engage/content/mobile-push.md | 2 +- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/engage/campaigns/mobile-push/index.md b/src/engage/campaigns/mobile-push/index.md index 98eb6465a2..dec702cb65 100644 --- a/src/engage/campaigns/mobile-push/index.md +++ b/src/engage/campaigns/mobile-push/index.md @@ -247,13 +247,30 @@ With your server key copied, finish steps 5 and 6 in the Twilio documentation. ## 4. Configure mobile push in Engage +Follow these steps to set up mobile push in Twilio Engage. + +### 4a. Set up Twilio credentials + > success "" -> If you've already configured SMS services for Twilio Engage, you can skip this step. +> Follow the steps in 4a only if you're new to Twilio Engage Premier. If you've already [configured messaging services](/docs/engage/onboarding/#generate-an-api-key-and-select-your-messaging-services) as part of Twilio Engage Premier onboarding, you can skip to 4b. + +1. In your Twilio console, select the **Account** dropdown menu, then **API keys & tokens**. +2. On the Auth tokens & API keys page, click **Create API key**. +3. Enter a name for the API key in the **Friendly name** field. +4. Set the region to **United States (US1) - Default** and key type to **Main**. +5. Click **Create API Key**. +6. Copy and save both the **SID** and **Secret** field contents. +7. Return to the API keys & tokens page. In the **Live credentials** section, copy the Account SID credentials. +8. Return to your Segment workspace and navigate to **Engage > Engage settings > Channels**. Under **SMS Service with Twilio**, click the **Get Started** button. The **Set up and validate your Twilio account** page appears. +11. Under **Enter your Twilio API Key information**, paste the Account SID, API Key SID, and API Key Secret you copied above into their corresponding fields. +12. Click **Verify**, then select the messaging services you want to use in your space. +13. Click **Save Twilio Account.** + +### 4b. Create a new push service -Follow these steps to set up mobile push in Twilio Engage and complete mobile push onboarding: +Complete mobile push onboarding by creating a new push service: -1. Follow the steps in the [Create and configure Twilio SMS services documentation](/docs/engage/onboarding/#stage-3-create-and-configure-twilio-sms-services). -2. Return to your Segment workspace and navigate to **Engage > Engage settings**. +2. In your Segment workspace, navigate to **Engage > Engage settings**. 3. Click the pencil icon next to **Messaging services**, then click **Create new push service**. - If you don't see the pencil icon, select **Create new push service**. 4. Name the push service, select or create APN and FCM credentials, then click **Create Push Service**. diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 3463d1424d..931d1f5730 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -35,7 +35,7 @@ When you build a mobile push template, you can choose between three click behavi | Behavior | Description | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Open app | Opens an app. You can specify a URL with or without merge tags to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | +| Open app | Opens an app. You can specify a URL to take the user to a specific screen with your app. If you don't enter a URL, this behavior will take the user to the app's home screen. | | Open URL | Opens the specified URL. | | Custom action | Takes any value as text input. Your app determines how to handle the value. For example, you could enter a custom action of `open_settings`, and then instruct your application to open the settings application when a user taps the push and the push arrives with `click behavior = open_settings`. | From ce04b41da39e3a22270dd0da289718ce96e0aba6 Mon Sep 17 00:00:00 2001 From: pwseg <86626706+pwseg@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:02:06 -0500 Subject: [PATCH 20/21] Update src/engage/campaigns/mobile-push/index.md Co-authored-by: rchinn-segment <93161299+rchinn-segment@users.noreply.github.com> --- src/engage/campaigns/mobile-push/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engage/campaigns/mobile-push/index.md b/src/engage/campaigns/mobile-push/index.md index dec702cb65..f4cec643e0 100644 --- a/src/engage/campaigns/mobile-push/index.md +++ b/src/engage/campaigns/mobile-push/index.md @@ -64,7 +64,7 @@ Follow these steps to integrate the React Native library: 1. Create a source by navigating to **Connections > Sources > Add Source**. 2. Search for **React Native**, then click **Add source**. -3. Use yarn or npm to install `@segment/analytics-react-native`, `@segment/sovran-react-native` and `react-native-get-random-values`. +3. Use yarn or npm to install `@segment/analytics-react-native`, `@segment/sovran-react-native`, and `react-native-get-random-values`. 4. Initialize and configure the Analytics React Native client. For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native getting started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). From 3251e8e3277e676588448012c961e868fb3743cb Mon Sep 17 00:00:00 2001 From: pwseg <86626706+pwseg@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:02:15 -0500 Subject: [PATCH 21/21] Update src/engage/content/mobile-push.md Co-authored-by: rchinn-segment <93161299+rchinn-segment@users.noreply.github.com> --- src/engage/content/mobile-push.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engage/content/mobile-push.md b/src/engage/content/mobile-push.md index 931d1f5730..896e4ee6dc 100644 --- a/src/engage/content/mobile-push.md +++ b/src/engage/content/mobile-push.md @@ -65,7 +65,7 @@ To personalize a mobile push, click **Add merge tags** in the template builder a Engage inserts the selected traits inside merge tags based on cursor placement in the message. This allows you to personalize each mobile push you send to recipients. You can also use [liquid templating](https://liquidjs.com/tags/if.html){:target="blank"} to create dynamic content in the template editor. > info "" -> To learn more about profile traits, visit Segment's [Computed Traits](/docs/engage/audiences/computed-traits/) and [SQL Traits](/docs/engage/audiences/sql-traits/) documentation. +> To learn more about profile traits, visit Segment's [Computed Traits](/docs/unify/traits/computed-traits/) and [SQL Traits](/docs/unify/traits/sql-traits/) documentation. ## Next steps