In-app features
Alongside its tracking capabilities, the SDKs embed some features aimed at Contentsquare users such as Snapshot Capture and SDK Logs.
Implement in-app features
Section titled Implement in-app featuresThis implementation phase is required on the iOS side only (on Android, there is nothing to do). You will have to do a few changes on the native side of your app:
1. Add the custom URL scheme to Info.plist
Section titled 1. Add the custom URL scheme to Info.plistIn order for your application to open when you scan the QR code or enter the URL we provide in a web browser, you have to add the custom URL scheme to your app’s Info.plist
file. For more info about how to do it, check the iOS documentation.
2. Call the SDK when your app is opened with the custom URL
Section titled 2. Call the SDK when your app is opened with the custom URLThen, you will need to link your app with our SDK. When your application is started via a deeplink, a specific delegate function is called in your AppDelegate file. In order for us to be able to handle it, you will need to call a function of our API that will handle it.
Call either the React Native or the iOS native API:
Call the React Native API
Section titled Call the React Native APIFollow this guide to call the React Native API.
Call the iOS native API
Section titled Call the iOS native APIYou will need to update your iOS application’s AppDelegate, located in the ios
folder of your React Native app (AppDelegate.m if you have a project set up in Objective-C, AppDelegate.swift if it is set up in Swift).
Import ContentsquareModule in order to be able to call the Contentsquare API from the AppDelegate.
⚠️ If you are using Flipper, make sure you do not write the import after the FB_SONARKIT_ENABLED
macro - to be sure, you can write your import at the topmost of the file. In general, make sure you do not import the SDK in the scope of an #ifdef
macro.
Implement the openURL delegate method as following.
Check the full section in the Native iOS SDK documentation
Enable in-app features
Section titled Enable in-app featuresIn-app features can be enabled in different ways:
Scan the QR Code
Section titled Scan the QR CodeIf you have access to the Contentsquare platform, you can open the in-app features modal from the menu and scan the QR code displayed with your phone.
Take a look at the native documentation for further information.
Alternative methods
Section titled Alternative methodsWe provide alternative methods to enable in-app features especially for iOS Simulator and Android Emulator.
📚 Native Android SDK documentation for Enable in-app features
📚 Native iOS SDK documentation for Enable in-app features
Debugging and Logging
Section titled Debugging and LoggingContentsquare provides Logging capabilities that allow you to see the raw event data logged by your app. This is very useful for validation purposes during the instrumentation phase of development and can help you discover errors and mistakes in your analytics implementation and confirm that all events are being logged correctly.
📚 Native Android SDK documentation for Debugging and Logging
📚 Native iOS SDK documentation for Debugging and Logging
Snapshot Capture
Section titled Snapshot CaptureIn order to unlock the full data-visualization capabilities of Contentsquare, the SDK provides a way to capture snapshots of your app screens. These snapshots can only be taken by Contentsquare’s users on their device. They are not captured from your end-users device. It means your Personal Data is safe, as long as you use a test user account.
📚 Native Android SDK documentation for Snapshot Capture
📚 Native iOS SDK documentation for Snapshot Capture