-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add In-App Forms to README #199
base: master
Are you sure you want to change the base?
Conversation
@@ -480,6 +485,42 @@ Linking.getInitialURL().then((url) => { | |||
}); | |||
``` | |||
|
|||
## In-App Forms | |||
|
|||
[In-app forms](https://help.klaviyo.com/hc/en-us/articles/34567685177883) are messages displayed to mobile app users while they are actively using an app. You can create new in-app forms in a drag-and-drop editor in the Sign-Up Forms tab in Klaviyo. Follow the instructions in this section to integrate forms with your app. The SDK will display forms according to their targeting and behavior settings and collect delivery and engagement analytics automatically. |
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.
[In-app forms](https://help.klaviyo.com/hc/en-us/articles/34567685177883) are messages displayed to mobile app users while they are actively using an app. You can create new in-app forms in a drag-and-drop editor in the Sign-Up Forms tab in Klaviyo. Follow the instructions in this section to integrate forms with your app. The SDK will display forms according to their targeting and behavior settings and collect delivery and engagement analytics automatically. | |
[In-app forms](https://help.klaviyo.com/hc/en-us/articles/34567685177883) are popups displayed to mobile app users while they are actively using an app. You can create new in-app forms in a drag-and-drop editor in the Sign-Up Forms tab in Klaviyo. Follow the instructions in this section to integrate forms with your app. The SDK will display forms according to their targeting and behavior settings and collect delivery and engagement analytics automatically. |
I think we're going to need some sort of section on setup for Android - we need to let them know that they have to call Applcation.onCreate() {
Klaviyo.registerForLifecycleCallbacks(this)
} in the native layer (unless they are initializing the Klaviyo SDK from the native layer in the Application onCreate) or else in app forms won't work. @evan-masseau any thoughts on that copy? Definitely want to make it obvious that this is required on Android. |
// call this any time after initializing your public API key | ||
Klaviyo.registerForInAppForms(); | ||
``` | ||
|
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.
Something like this for android:
#### Android | |
In your Application class you **must** call `Klaviyo.registerForLifecycleCallbacks(applicationContext)`, due to timing issues, this cannot be achieved from the RN layer at this time. | |
```kotlin | |
// Application subclass | |
import android.app.Application | |
import com.klaviyo.analytics.Klaviyo | |
class YourApplication : Application() { | |
override fun onCreate() { | |
super.onCreate() | |
/* ... */ | |
// Initialize is required before invoking any other Klaviyo SDK functionality | |
Klaviyo.initialize("KLAVIYO_PUBLIC_API_KEY", applicationContext) | |
// If unable to call initialize, you must at least register lifecycle listeners: | |
Klaviyo.registerForLifecycleCallbacks(applicationContext) | |
} |
this suggestion block won't quite work because of nested back ticks :( ```
Description
https://klaviyo.atlassian.net/browse/CHNL-16763
Read the formatted README here