Page contents
show page contents
This page gives instructions for upgrading to newer versions of the C++ tracker.
Upgrading to v0.3.0
There are a few breaking changes in this release. Please make sure to:
- Remove the
Tracker::
prefix when referring to event types, e.g., useScreenViewEvent()
instead ofTracker::ScreenViewEvent()
. - Use the common
tracker->track(event)
function to track events (instead oftracker->track_self_describing_event(event)
,tracker->track_screen_view(event)
, …). - Use the
event.set_context(context)
andevent.set_true_timestamp(tt)
setters instead of accessingevent.contexts
andevent.true_timestamp
directly. - Event IDs are no longer accessible from the event objects but are returned from the
tracker->track(event)
function. Emitter
andClientSession
no longer accept database path string for storage but require an instance ofSqliteStorage
(or other storage implementation, see the docs).- Use
#include "snowplow.hpp"
to import all public APIs of the tracker instead of including individual files.
Upgrading to v0.2.0
This version adds a snowplow
namespace to all tracker components. You will need to import specific or all types from the namespace:
using namespace snowplow;
Code language: C++ (cpp)
The constructor for ClientSession
also changed, dropping the last argument for check_interval
that is no longer necessary. Simply remove the last argument when creating an instance of ClientSession
.