In-app features

A newer version of this documentation is available. Swtich to the latest version docs.

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

Implement in-app features (iOS Only)

Section titled Implement in-app features (iOS Only)

In order to allow Contentsquare users to enable in-app features, you must perform 2 implementation tasks:

  1. Add the custom URL scheme in your app Info
  2. Call the SDK when the app is launched via a deeplink

1. Add the custom URL scheme in your app Info

Section titled 1. Add the custom URL scheme in your app Info

You have to allow your app to be opened via a custom URL scheme which can be done using one of the following methods:

  1. Open your project settings
  2. Select the app target
  3. Select the Info settings
  4. Scroll to URL Types
  5. Set the URL scheme to cs-$(PRODUCT_BUNDLE_IDENTIFIER)
  1. Open the Info.plist of your project

  2. Add the following snippet:

    Info.plist
    <key>CFBundleURLTypes</key>
    <array>
    <dict>
    <key>CFBundleURLSchemes</key>
    <array>
    <string>cs-$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    </array>
    </dict>
    </array>
Section titled 2. Call the SDK when the app is launched via a deeplink

In ios/Runner/AppDelegate.swift, add a new method to the AppDelegate class:

ios/Runner/AppDelegate.swift
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
Contentsquare.handle(url: url)
return super.application(app, open: url, options: options)
}

Here is what your AppDelegate class should look like after adding the in-app features:

ios/Runner/AppDelegate.swift
import UIKit
import Flutter
import ContentsquareModule
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
// Add this method:
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
Contentsquare.handle(url: url)
return super.application(app, open: url, options: options)
}
}

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.

Follow the Native Android SDK documentation for Enable in-app features

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

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.

Follow the Native Android SDK documentation for Snapshot Capture