Skip to content
Feralin

Developers

C / C++ native: quickstart

Install and first-use steps for sending events to Feralin with C / C++ native. Code samples come from the SDK's own README and statuses from the capability record.

Install

feralin 0.1.0 is published on CMake FetchContent + Git etiketi; install it with your package manager using the command below.

include(FetchContent)
FetchContent_Declare(
  feralin
  GIT_REPOSITORY https://github.com/feralincom/sdk.git
  GIT_TAG        sdks/cpp/v0.1.0
  GIT_SHALLOW    TRUE
  SOURCE_SUBDIR  sdks/cpp)
FetchContent_MakeAvailable(feralin)
target_link_libraries(uygulamam PRIVATE feralin::feralin)
cmake -S sdks/cpp -B sdks/cpp/build -DCMAKE_BUILD_TYPE=Release
cmake --build sdks/cpp/build
cmake --install sdks/cpp/build --prefix /opt/feralin
find_package(feralin CONFIG REQUIRED)     # -DCMAKE_PREFIX_PATH=/opt/feralin
target_link_libraries(uygulamam PRIVATE feralin::feralin)

First use

#include <feralin/feralin.hpp>

feralin::Options options;
options.project_key = "pk_live_...";                 // sk_ reddedilir
options.collect_url = "https://collect.example.com";
options.consent.analytics = true;                    // kullanıcıdan alınan izin; varsayılan kapalı

auto client = feralin::Client::create(options);      // geçersiz seçenekte nullptr
client->track("order_completed", {{"order_id", "ord_1"}, {"amount", 249.9}});
feralin::FlushResult result = client->close();       // kalan olayları en fazla 5 sn içinde gönderir
#include <feralin/feralin.h>

feralin_options options;
feralin_options_init(&options);
options.project_key = "pk_live_...";
options.collect_url = "https://collect.example.com";
options.consent = FERALIN_CONSENT_ANALYTICS;

feralin_client* client = NULL;
if (feralin_client_new(&options, &client) != FERALIN_OK) { /* feralin_last_error() */ }

feralin_props* props = feralin_props_new();
feralin_props_set_string(props, "order_id", "ord_1");
feralin_track(client, "order_completed", props, NULL, NULL);
feralin_props_free(props);
feralin_client_free(client);  /* kapatır, kalan olayları göndermeyi dener */

Code samples are taken as they are from sdks/cpp/README.md; comments inside may be in Turkish. You create the project key in the dashboard.

Capabilities

C / C++ native capability status
CapabilityStatus
Event sendingSupported
Batch sendingPartial
Consent handlingSupported
IdentityPartial
AttributionNot applicable
Deep linksNot applicable
RevenuePartial
Error capturePartial
Session replayNot applicable
TracingPlanned

Verification chain

C / C++ native verification chain
LinkStatus
SourcePassed
BuildPassed
TestPassed
Registry publicationPassed
Clean installPassed
Event receiptPassed
DocumentationPassed
Super Admin proofNot started

Passed means local evidence: source, build and tests ran. Registry publication and Super Admin proof are separate links; the SDK is not called ready until each has passed.