Collecting data with Trackers and Webhooks

  1. Home
  2. Docs
  3. Collecting data with Trackers and Webhooks
  4. Trackers – collecting data from your own applications
  5. C++ Tracker
  6. Setup

Setup

Tracker compatibility

The Snowplow C++ Tracker has been built and tested using C++ 11 as a minimum.

Supported operating systems:

  • macOS
  • Windows
  • Linux

Installing in your project

There are two ways to install the tracker in your app:

  1. By including the project using cmake.
  2. By copying source files inside the include folder into your codebase.

Using cmake

Cmake version 3.14 or greater is required. You may add the library to your project target (your-target) using FetchContent like so:

include(FetchContent) FetchContent_Declare( snowplow GIT_REPOSITORY https://github.com/snowplow/snowplow-cpp-tracker GIT_TAG 1.0.0 ) FetchContent_MakeAvailable(snowplow) target_link_libraries(your-target snowplow)
Code language: CMake (cmake)

Copying files to your project

Download the most recent release from the releases section. Everything in the include folder will need to be included in your application.

The project has two dependencies that need to be included in your project: nlohmann/json and the amalgamated version of sqlite3. You will need to update the include paths in headers include/snowplow/thirdparty/json.hpp and include/snowplow/thirdparty/sqlite3.hpp.

Additional requirements under Linux

Additionally, under Linux, the following libraries need to be installed:

  • curl (using apt install libcurl4-openssl-dev on Ubuntu)
  • uuid (using apt install uuid-dev on Ubuntu)

If you’d like to learn more about Snowplow BDP you can book a demo with our team, or if you’d prefer, you can try Snowplow technology for yourself quickly and easily.