Snowplow C++ Tracker 0.1.0 released

Share

We are pleased to announce the release of the Snowplow C++ Tracker. The Tracker is designed to work asynchronously and dependency-free within your C++ code to provide great performance in your applications, games and servers, even under heavy load, while also storing all of your events persistently allowing recovery from temporary network outages.

In the rest of this post we will cover:

  1. How to install the tracker
  2. How to use the tracker
  3. Core features
  4. Roadmap
  5. Documentation
  6. Getting help

1. How to install the tracker

This tracker is source-only and requires no external dependencies. You can get the source code bundle here:

$ wget https://github.com/snowplow/snowplow-cpp-tracker/archive/master.zip

Please check out the C++ Tracker setup guide on our wiki for more information on setup.

That’s it! You’re now ready to start using the Tracker.

2. How to use the tracker

To setup the C++ Tracker you first need include the source files in your project:

You can then instantiate and start a new tracker like so:

#include "tracker.hpp"  Emitter emitter("com.acme.collector", Emitter::Method::POST, Emitter::Protocol::HTTP, 500, 52000, 52000, "events.db"<span class="p">); Tracker *t = Tracker::init(emitter, NULL, NULL, NULL, NULL, NULL, NULL<span class="p">);

You are now ready to track events, so let’s send a screen view event:

string name = "Screen ID - 5asd56"<span class="p">; Tracker::ScreenViewEvent sve<span class="p">; sve.name = &name<span class="p">; Tracker::instance()->track_screen_view(sve<span class="p">);

And that’s all there is to it! Please check out the C++ Tracker technical documentation on our wiki for the tracker’s full API.

3. Core features

The core features of the Snowplow C++ Tracker include:

The general flow of the Tracker as an event goes through:

This model is very closely related to the one used in the Golang, Android, Objective-C and Unity Trackers, which are all backed by Sqlite databases.

The Tracker also contains full support for secure event sending by both GET and POST request types, and the ability to combine events, for POST, up to a configurable byte limit. This yields much better performance versus our old approach of buffer limits.

4. Roadmap

Currently the Snowplow C++ Tracker only supports macOS and Windows, but we’re looking to support Linux in the future!

5. Documentation

6. Getting help

We hope that you find the Snowplow C++ Tracker useful – of course, this is only its first release, so don’t be afraid to get in touch or raise an issue on GitHub!

Share

Related articles