In-app features

Alongside its tracking capabilities, the SDKs embed some features aimed at Contentsquare users such as Snapshot Capture and SDK Logs.

This 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.plist

In 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 URL

Then, 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:

Follow this guide to call the React Native API.

Linking.addEventListener('url', (event: { url: string }) => {
Contentsquare.handleUrl(event.url);
});

You 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.

import ContentsquareModule

Implement the openURL delegate method as following.

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
Contentsquare.handle(url: url)
return true
}

Check the full section in the Native iOS SDK documentation

In-app features can be enabled in different ways:

If 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.

We 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

Contentsquare provides Logging capabilities that allow you to see the raw event data logged by your app. Use this 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

In 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