Implement in-app featuresSection titled Implement in-app features
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 InfoSection 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:
XcodeSection titled Xcode
- Open your project settings
- Select the app target
- Select the
- Scroll to
- Set the URL scheme to
Text editorSection titled Text editor
Info.plistof your project
Add the following snippet:
2. Call the SDK when the app is launched via a deeplinkSection titled 2. Call the SDK when the app is launched via a deeplink
Depending of the project, there are multiple ways to handle the deeplink opening. Choose the method matching your project structure:
AppDelegate class, complete or implement the function
application(app, open url:, options:) with:
WindowSceneDelegate class, you need to:
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)with:
Complete or implement
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)with:
body of your main App struct, add the
onOpenURL modifier and call the
Contentsquare SDK to handle the URL:
Enable in-app featuresSection titled Enable in-app features
Once the implementation is done, in-app features can be enabled in different ways:
Scan the QR codeSection titled Scan the QR code
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 iPhone.
Use the custom link for simulatorSection titled Use the custom link for simulator
If you have access to the Contentsquare platform, you can open the in-app features modal from the menu and select “Copy link” (to copy the deeplink) and paste it in Safari on your Simulator to trigger the in-app features.
Using the TerminalSection titled Using the Terminal
In a Terminal console, open an URL in your current simulator with the following command (replacing “CUSTOM_LINK” with yours):
Debugging and LoggingSection titled Debugging and Logging
Contentsquare provides Logging capabilities that allow you to see the raw event data logged by your app in the MacOS Console App, Xcode or in the Contentsquare platform. 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.
Viewing Logs in Xcode or the MacOS Console appSection titled Viewing Logs in Xcode or the MacOS Console app
By default, almost all logs are disabled. There is only one log that is always visible to notify that the SDK has started:
In order to enable all logs, you simply need to activate in-app features. Logging is directly linked to in-app features state: it starts when in-app features is enabled and stops when you disable in-app features.
To view logs:
- Make sure the device you are using is plugged to your Mac or is on the same Wi-Fi network (skip this step if you are using a simulator)
- Start the MacOS Console app (make sure that info messages are included: Choose Action > Include Info Messages) or Xcode.
- Filter logs on
Viewing logs in the Contentsquare platformSection titled Viewing logs in the Contentsquare platform
To view logs directly on the platform, you can use Log visualizer. Log visualizer is a helper tool to see SDK logs without logging tools. It requires having platform access for your project and enabling in-app features. See the SDK Log Visualizer Help Center Article for more information.
Snapshot CaptureSection titled Snapshot Capture
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.
Snapshots are used in the Zoning Analysis module to look at zone-level metrics (Tap rate, Swipe rate…):