[{"data":1,"prerenderedAt":4901},["ShallowReactive",2],{"beacon-doc-\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fcpp":3,"beacon-docs-all":959},{"id":4,"title":5,"body":6,"description":951,"extension":952,"meta":953,"navigation":94,"order":249,"path":954,"published":94,"section":955,"seo":956,"stem":957,"__hash__":958},"beaconDocs\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fcpp.md","C++ SDK",{"type":7,"value":8,"toc":928},"minimark",[9,14,18,23,28,36,102,106,163,166,170,186,190,298,305,344,348,556,560,563,572,575,579,591,595,620,624,648,652,695,699,706,752,762,766,769,778,781,790,794,797,808,812,819,828,835,839,845,849,856,896,900,924],[10,11,13],"h1",{"id":12},"beacon-c-sdk","Beacon C++ SDK",[15,16,17],"p",{},"The Beacon C++ SDK provides native integration for Windows desktop applications, server processes, and cross-platform C++ projects.",[19,20,22],"h2",{"id":21},"installation","Installation",[24,25,27],"h3",{"id":26},"cmake-fetchcontent-recommended","CMake FetchContent (recommended)",[15,29,30,31,35],{},"Add Beacon to your ",[32,33,34],"code",{},"CMakeLists.txt",":",[37,38,43],"pre",{"className":39,"code":40,"language":41,"meta":42,"style":42},"language-cmake shiki shiki-themes github-dark","include(FetchContent)\nFetchContent_Declare(\n  beacon_sdk\n  GIT_REPOSITORY https:\u002F\u002Fgithub.com\u002Fsoftagility\u002Fbeacon-sdk-cpp.git\n  GIT_TAG        v1.0.0\n)\nFetchContent_MakeAvailable(beacon_sdk)\n\ntarget_link_libraries(your_app PRIVATE beacon_sdk)\n","cmake","",[32,44,45,53,59,65,71,77,83,89,96],{"__ignoreMap":42},[46,47,50],"span",{"class":48,"line":49},"line",1,[46,51,52],{},"include(FetchContent)\n",[46,54,56],{"class":48,"line":55},2,[46,57,58],{},"FetchContent_Declare(\n",[46,60,62],{"class":48,"line":61},3,[46,63,64],{},"  beacon_sdk\n",[46,66,68],{"class":48,"line":67},4,[46,69,70],{},"  GIT_REPOSITORY https:\u002F\u002Fgithub.com\u002Fsoftagility\u002Fbeacon-sdk-cpp.git\n",[46,72,74],{"class":48,"line":73},5,[46,75,76],{},"  GIT_TAG        v1.0.0\n",[46,78,80],{"class":48,"line":79},6,[46,81,82],{},")\n",[46,84,86],{"class":48,"line":85},7,[46,87,88],{},"FetchContent_MakeAvailable(beacon_sdk)\n",[46,90,92],{"class":48,"line":91},8,[46,93,95],{"emptyLinePlaceholder":94},true,"\n",[46,97,99],{"class":48,"line":98},9,[46,100,101],{},"target_link_libraries(your_app PRIVATE beacon_sdk)\n",[24,103,105],{"id":104},"build-from-source","Build from Source",[37,107,111],{"className":108,"code":109,"language":110,"meta":42,"style":42},"language-bash shiki shiki-themes github-dark","git clone https:\u002F\u002Fgithub.com\u002Fsoftagility\u002Fbeacon-sdk-cpp.git\ncd beacon-sdk-cpp\ncmake -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build --config Release\n","bash",[32,112,113,126,135,148],{"__ignoreMap":42},[46,114,115,119,123],{"class":48,"line":49},[46,116,118],{"class":117},"svObZ","git",[46,120,122],{"class":121},"sU2Wk"," clone",[46,124,125],{"class":121}," https:\u002F\u002Fgithub.com\u002Fsoftagility\u002Fbeacon-sdk-cpp.git\n",[46,127,128,132],{"class":48,"line":55},[46,129,131],{"class":130},"sDLfK","cd",[46,133,134],{"class":121}," beacon-sdk-cpp\n",[46,136,137,139,142,145],{"class":48,"line":61},[46,138,41],{"class":117},[46,140,141],{"class":130}," -B",[46,143,144],{"class":121}," build",[46,146,147],{"class":130}," -DCMAKE_BUILD_TYPE=Release\n",[46,149,150,152,155,157,160],{"class":48,"line":67},[46,151,41],{"class":117},[46,153,154],{"class":130}," --build",[46,156,144],{"class":121},[46,158,159],{"class":130}," --config",[46,161,162],{"class":121}," Release\n",[15,164,165],{},"Dependencies (libcurl, nlohmann_json, SQLite3) are fetched automatically via CMake FetchContent if not found on the system.",[24,167,169],{"id":168},"system-requirements","System Requirements",[171,172,173,177,180,183],"ul",{},[174,175,176],"li",{},"C++17 or later",[174,178,179],{},"Windows 10+, Linux (glibc 2.28+), or macOS 12+",[174,181,182],{},"CMake 3.25+",[174,184,185],{},"Dependencies resolved automatically (libcurl, nlohmann_json, SQLite3)",[19,187,189],{"id":188},"configuration","Configuration",[37,191,195],{"className":192,"code":193,"language":194,"meta":42,"style":42},"language-cpp shiki shiki-themes github-dark","#include \u003Cbeacon\u002Fbeacon.hpp>\n\nint main()\n{\n    auto tracker = beacon::Tracker::configure([](beacon::Options& opts) {\n        opts.api_key = \"your-api-key\";\n        opts.api_base_url = \"https:\u002F\u002Fapi.beacon.softagility.com\";\n        opts.app_name = \"MyApp\";\n        opts.app_version = \"1.2.0\";\n    });\n\n    tracker->identify(\"user-123\");\n    tracker->startSession();\n\n    \u002F\u002F Your application code here...\n\n    tracker->endSession();\n    return 0;\n}\n","cpp",[32,196,197,202,206,211,216,221,226,231,236,241,247,252,258,264,269,275,280,286,292],{"__ignoreMap":42},[46,198,199],{"class":48,"line":49},[46,200,201],{},"#include \u003Cbeacon\u002Fbeacon.hpp>\n",[46,203,204],{"class":48,"line":55},[46,205,95],{"emptyLinePlaceholder":94},[46,207,208],{"class":48,"line":61},[46,209,210],{},"int main()\n",[46,212,213],{"class":48,"line":67},[46,214,215],{},"{\n",[46,217,218],{"class":48,"line":73},[46,219,220],{},"    auto tracker = beacon::Tracker::configure([](beacon::Options& opts) {\n",[46,222,223],{"class":48,"line":79},[46,224,225],{},"        opts.api_key = \"your-api-key\";\n",[46,227,228],{"class":48,"line":85},[46,229,230],{},"        opts.api_base_url = \"https:\u002F\u002Fapi.beacon.softagility.com\";\n",[46,232,233],{"class":48,"line":91},[46,234,235],{},"        opts.app_name = \"MyApp\";\n",[46,237,238],{"class":48,"line":98},[46,239,240],{},"        opts.app_version = \"1.2.0\";\n",[46,242,244],{"class":48,"line":243},10,[46,245,246],{},"    });\n",[46,248,250],{"class":48,"line":249},11,[46,251,95],{"emptyLinePlaceholder":94},[46,253,255],{"class":48,"line":254},12,[46,256,257],{},"    tracker->identify(\"user-123\");\n",[46,259,261],{"class":48,"line":260},13,[46,262,263],{},"    tracker->startSession();\n",[46,265,267],{"class":48,"line":266},14,[46,268,95],{"emptyLinePlaceholder":94},[46,270,272],{"class":48,"line":271},15,[46,273,274],{},"    \u002F\u002F Your application code here...\n",[46,276,278],{"class":48,"line":277},16,[46,279,95],{"emptyLinePlaceholder":94},[46,281,283],{"class":48,"line":282},17,[46,284,285],{},"    tracker->endSession();\n",[46,287,289],{"class":48,"line":288},18,[46,290,291],{},"    return 0;\n",[46,293,295],{"class":48,"line":294},19,[46,296,297],{},"}\n",[15,299,300,301,304],{},"You can also pass an ",[32,302,303],{},"Options"," struct directly:",[37,306,308],{"className":192,"code":307,"language":194,"meta":42,"style":42},"beacon::Options opts;\nopts.api_key = \"your-api-key\";\nopts.api_base_url = \"https:\u002F\u002Fapi.beacon.softagility.com\";\nopts.app_name = \"MyApp\";\nopts.app_version = \"1.2.0\";\n\nauto tracker = beacon::Tracker::configure(opts);\n",[32,309,310,315,320,325,330,335,339],{"__ignoreMap":42},[46,311,312],{"class":48,"line":49},[46,313,314],{},"beacon::Options opts;\n",[46,316,317],{"class":48,"line":55},[46,318,319],{},"opts.api_key = \"your-api-key\";\n",[46,321,322],{"class":48,"line":61},[46,323,324],{},"opts.api_base_url = \"https:\u002F\u002Fapi.beacon.softagility.com\";\n",[46,326,327],{"class":48,"line":67},[46,328,329],{},"opts.app_name = \"MyApp\";\n",[46,331,332],{"class":48,"line":73},[46,333,334],{},"opts.app_version = \"1.2.0\";\n",[46,336,337],{"class":48,"line":79},[46,338,95],{"emptyLinePlaceholder":94},[46,340,341],{"class":48,"line":85},[46,342,343],{},"auto tracker = beacon::Tracker::configure(opts);\n",[24,345,347],{"id":346},"configuration-options","Configuration Options",[349,350,351,370],"table",{},[352,353,354],"thead",{},[355,356,357,361,364,367],"tr",{},[358,359,360],"th",{},"Option",[358,362,363],{},"Type",[358,365,366],{},"Default",[358,368,369],{},"Description",[371,372,373,392,408,424,440,460,480,499,518,536],"tbody",{},[355,374,375,381,386,389],{},[376,377,378],"td",{},[32,379,380],{},"api_key",[376,382,383],{},[32,384,385],{},"std::string",[376,387,388],{},"—",[376,390,391],{},"Your Beacon API key (required)",[355,393,394,399,403,405],{},[376,395,396],{},[32,397,398],{},"api_base_url",[376,400,401],{},[32,402,385],{},[376,404,388],{},[376,406,407],{},"Beacon API base URL (required)",[355,409,410,415,419,421],{},[376,411,412],{},[32,413,414],{},"app_name",[376,416,417],{},[32,418,385],{},[376,420,388],{},[376,422,423],{},"Your application name (required)",[355,425,426,431,435,437],{},[376,427,428],{},[32,429,430],{},"app_version",[376,432,433],{},[32,434,385],{},[376,436,388],{},[376,438,439],{},"Your application version (required)",[355,441,442,447,452,457],{},[376,443,444],{},[32,445,446],{},"enabled",[376,448,449],{},[32,450,451],{},"bool",[376,453,454],{},[32,455,456],{},"true",[376,458,459],{},"Enable or disable tracking globally",[355,461,462,467,472,477],{},[376,463,464],{},[32,465,466],{},"flush_interval_seconds",[376,468,469],{},[32,470,471],{},"int",[376,473,474],{},[32,475,476],{},"60",[376,478,479],{},"Batch send interval in seconds (1-3600)",[355,481,482,487,491,496],{},[376,483,484],{},[32,485,486],{},"max_batch_size",[376,488,489],{},[32,490,471],{},[376,492,493],{},[32,494,495],{},"25",[376,497,498],{},"Events per batch, clamped to 1-1000",[355,500,501,506,510,515],{},[376,502,503],{},[32,504,505],{},"max_queue_size_mb",[376,507,508],{},[32,509,471],{},[376,511,512],{},[32,513,514],{},"10",[376,516,517],{},"Maximum offline queue size in MB (1-1000)",[355,519,520,525,529,533],{},[376,521,522],{},[32,523,524],{},"max_breadcrumbs",[376,526,527],{},[32,528,471],{},[376,530,531],{},[32,532,495],{},[376,534,535],{},"Breadcrumb ring buffer size (0-200)",[355,537,538,543,548,553],{},[376,539,540],{},[32,541,542],{},"logger",[376,544,545],{},[32,546,547],{},"std::shared_ptr\u003CILogger>",[376,549,550],{},[32,551,552],{},"nullptr",[376,554,555],{},"Optional logger for SDK diagnostics",[19,557,559],{"id":558},"identifying-users","Identifying Users",[15,561,562],{},"Before tracking events or sessions, identify the current actor:",[37,564,566],{"className":192,"code":565,"language":194,"meta":42,"style":42},"tracker->identify(\"user-123\");\n",[32,567,568],{"__ignoreMap":42},[46,569,570],{"class":48,"line":49},[46,571,565],{},[15,573,574],{},"Once identified, all subsequent calls use this actor. You can also pass an explicit actor ID to tracking methods.",[19,576,578],{"id":577},"tracking-events","Tracking Events",[15,580,581,582,586,587,590],{},"Events are organized by ",[583,584,585],"strong",{},"category"," and ",[583,588,589],{},"name",", with optional properties.",[24,592,594],{"id":593},"basic-event","Basic Event",[37,596,598],{"className":192,"code":597,"language":194,"meta":42,"style":42},"tracker->track(\"ui\", \"button_clicked\", {\n    {\"button_name\", \"export\"},\n    {\"screen\", \"dashboard\"}\n});\n",[32,599,600,605,610,615],{"__ignoreMap":42},[46,601,602],{"class":48,"line":49},[46,603,604],{},"tracker->track(\"ui\", \"button_clicked\", {\n",[46,606,607],{"class":48,"line":55},[46,608,609],{},"    {\"button_name\", \"export\"},\n",[46,611,612],{"class":48,"line":61},[46,613,614],{},"    {\"screen\", \"dashboard\"}\n",[46,616,617],{"class":48,"line":67},[46,618,619],{},"});\n",[24,621,623],{"id":622},"with-explicit-actor","With Explicit Actor",[37,625,627],{"className":192,"code":626,"language":194,"meta":42,"style":42},"tracker->track(\"reports\", \"report_exported\", \"user-456\", {\n    {\"format\", \"pdf\"},\n    {\"row_count\", \"1500\"}\n});\n",[32,628,629,634,639,644],{"__ignoreMap":42},[46,630,631],{"class":48,"line":49},[46,632,633],{},"tracker->track(\"reports\", \"report_exported\", \"user-456\", {\n",[46,635,636],{"class":48,"line":55},[46,637,638],{},"    {\"format\", \"pdf\"},\n",[46,640,641],{"class":48,"line":61},[46,642,643],{},"    {\"row_count\", \"1500\"}\n",[46,645,646],{"class":48,"line":67},[46,647,619],{},[19,649,651],{"id":650},"session-management","Session Management",[37,653,655],{"className":192,"code":654,"language":194,"meta":42,"style":42},"\u002F\u002F Start a session (uses the identified actor)\ntracker->startSession();\n\n\u002F\u002F Or start with an explicit actor ID\ntracker->startSession(\"user-123\");\n\n\u002F\u002F End the current session\ntracker->endSession();\n",[32,656,657,662,667,671,676,681,685,690],{"__ignoreMap":42},[46,658,659],{"class":48,"line":49},[46,660,661],{},"\u002F\u002F Start a session (uses the identified actor)\n",[46,663,664],{"class":48,"line":55},[46,665,666],{},"tracker->startSession();\n",[46,668,669],{"class":48,"line":61},[46,670,95],{"emptyLinePlaceholder":94},[46,672,673],{"class":48,"line":67},[46,674,675],{},"\u002F\u002F Or start with an explicit actor ID\n",[46,677,678],{"class":48,"line":73},[46,679,680],{},"tracker->startSession(\"user-123\");\n",[46,682,683],{"class":48,"line":79},[46,684,95],{"emptyLinePlaceholder":94},[46,686,687],{"class":48,"line":85},[46,688,689],{},"\u002F\u002F End the current session\n",[46,691,692],{"class":48,"line":91},[46,693,694],{},"tracker->endSession();\n",[19,696,698],{"id":697},"exception-tracking","Exception Tracking",[15,700,701,702,705],{},"Track exceptions with severity levels. Breadcrumbs from recent ",[32,703,704],{},"track()"," calls are attached automatically.",[37,707,709],{"className":192,"code":708,"language":194,"meta":42,"style":42},"try\n{\n    process_order(order);\n}\ncatch (const std::exception& ex)\n{\n    tracker->trackException(ex, beacon::ExceptionSeverity::NonFatal);\n    throw;\n}\n",[32,710,711,716,720,725,729,734,738,743,748],{"__ignoreMap":42},[46,712,713],{"class":48,"line":49},[46,714,715],{},"try\n",[46,717,718],{"class":48,"line":55},[46,719,215],{},[46,721,722],{"class":48,"line":61},[46,723,724],{},"    process_order(order);\n",[46,726,727],{"class":48,"line":67},[46,728,297],{},[46,730,731],{"class":48,"line":73},[46,732,733],{},"catch (const std::exception& ex)\n",[46,735,736],{"class":48,"line":79},[46,737,215],{},[46,739,740],{"class":48,"line":85},[46,741,742],{},"    tracker->trackException(ex, beacon::ExceptionSeverity::NonFatal);\n",[46,744,745],{"class":48,"line":91},[46,746,747],{},"    throw;\n",[46,749,750],{"class":48,"line":98},[46,751,297],{},[15,753,754,755,586,758,761],{},"Severity options: ",[32,756,757],{},"beacon::ExceptionSeverity::Fatal",[32,759,760],{},"beacon::ExceptionSeverity::NonFatal",".",[19,763,765],{"id":764},"flushing-events","Flushing Events",[15,767,768],{},"Events are batched and sent on a timer or when the batch size is reached. To flush manually:",[37,770,772],{"className":192,"code":771,"language":194,"meta":42,"style":42},"bool success = tracker->flush(); \u002F\u002F Blocks up to 30 seconds\n",[32,773,774],{"__ignoreMap":42},[46,775,776],{"class":48,"line":49},[46,777,771],{},[15,779,780],{},"Check the last flush result:",[37,782,784],{"className":192,"code":783,"language":194,"meta":42,"style":42},"beacon::FlushStatus status = tracker->last_flush_status();\n",[32,785,786],{"__ignoreMap":42},[46,787,788],{"class":48,"line":49},[46,789,783],{},[19,791,793],{"id":792},"offline-persistence","Offline Persistence",[15,795,796],{},"Events are persisted to a local SQLite database when the network is unavailable. The queue syncs automatically when connectivity returns.",[171,798,799,802,805],{},[174,800,801],{},"Persists across application restarts",[174,803,804],{},"Thread-safe queue with configurable size limit",[174,806,807],{},"Zero data loss during transient failures",[19,809,811],{"id":810},"singleton-access","Singleton Access",[15,813,814,815,818],{},"After calling ",[32,816,817],{},"configure()",", retrieve the tracker instance anywhere with:",[37,820,822],{"className":192,"code":821,"language":194,"meta":42,"style":42},"auto tracker = beacon::Tracker::instance();\n",[32,823,824],{"__ignoreMap":42},[46,825,826],{"class":48,"line":49},[46,827,821],{},[15,829,830,831,834],{},"Call ",[32,832,833],{},"beacon::Tracker::reset_for_testing()"," in test teardown to clear the singleton.",[19,836,838],{"id":837},"thread-safety","Thread Safety",[15,840,841,844],{},[32,842,843],{},"beacon::Tracker"," is fully thread-safe. Share a single instance across threads.",[19,846,848],{"id":847},"raii-lifetime-management","RAII Lifetime Management",[15,850,851,852,855],{},"The SDK follows RAII conventions. When the ",[32,853,854],{},"Tracker"," shared_ptr reference count reaches zero, pending events are flushed and the active session is ended:",[37,857,859],{"className":192,"code":858,"language":194,"meta":42,"style":42},"{\n    auto tracker = beacon::Tracker::configure(configurator);\n    tracker->identify(\"user-123\");\n    tracker->startSession();\n\n    \u002F\u002F Track events...\n\n} \u002F\u002F Session ended, events flushed, resources released\n",[32,860,861,865,870,874,878,882,887,891],{"__ignoreMap":42},[46,862,863],{"class":48,"line":49},[46,864,215],{},[46,866,867],{"class":48,"line":55},[46,868,869],{},"    auto tracker = beacon::Tracker::configure(configurator);\n",[46,871,872],{"class":48,"line":61},[46,873,257],{},[46,875,876],{"class":48,"line":67},[46,877,263],{},[46,879,880],{"class":48,"line":73},[46,881,95],{"emptyLinePlaceholder":94},[46,883,884],{"class":48,"line":79},[46,885,886],{},"    \u002F\u002F Track events...\n",[46,888,889],{"class":48,"line":85},[46,890,95],{"emptyLinePlaceholder":94},[46,892,893],{"class":48,"line":91},[46,894,895],{},"} \u002F\u002F Session ended, events flushed, resources released\n",[19,897,899],{"id":898},"next-steps","Next Steps",[171,901,902,910,917],{},[174,903,904,909],{},[905,906,908],"a",{"href":907},"\u002Fbeacon\u002Fdocs\u002Fgetting-started","Getting Started"," for a general overview",[174,911,912,916],{},[905,913,915],{"href":914},"\u002Fbeacon\u002Fdocs\u002Fapi-reference","API Reference"," for direct HTTP integration",[174,918,919,923],{},[905,920,922],{"href":921},"\u002Fbeacon\u002Fpricing","Pricing"," for plan details",[925,926,927],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}",{"title":42,"searchDepth":55,"depth":55,"links":929},[930,935,938,939,943,944,945,946,947,948,949,950],{"id":21,"depth":55,"text":22,"children":931},[932,933,934],{"id":26,"depth":61,"text":27},{"id":104,"depth":61,"text":105},{"id":168,"depth":61,"text":169},{"id":188,"depth":55,"text":189,"children":936},[937],{"id":346,"depth":61,"text":347},{"id":558,"depth":55,"text":559},{"id":577,"depth":55,"text":578,"children":940},[941,942],{"id":593,"depth":61,"text":594},{"id":622,"depth":61,"text":623},{"id":650,"depth":55,"text":651},{"id":697,"depth":55,"text":698},{"id":764,"depth":55,"text":765},{"id":792,"depth":55,"text":793},{"id":810,"depth":55,"text":811},{"id":837,"depth":55,"text":838},{"id":847,"depth":55,"text":848},{"id":898,"depth":55,"text":899},"Integrate Beacon product analytics into native C++ desktop and server applications.","md",{},"\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fcpp","SDKs",{"title":5,"description":951},"beacon\u002Fdocs\u002Fsdk\u002Fcpp","pZH0WIjTkxZn0eF0NsqxxLOQdUawhjo3-7gg56ynH_U",[960,1487,2717,3415,4384],{"id":961,"title":908,"body":962,"description":1481,"extension":952,"meta":1482,"navigation":94,"order":49,"path":907,"published":94,"section":1483,"seo":1484,"stem":1485,"__hash__":1486},"beaconDocs\u002Fbeacon\u002Fdocs\u002Fgetting-started.md",{"type":7,"value":963,"toc":1468},[964,968,971,975,991,995,999,1002,1065,1069,1072,1156,1159,1235,1238,1256,1260,1263,1294,1298,1301,1360,1364,1367,1371,1374,1379,1396,1401,1418,1421,1425,1428,1439,1441,1465],[10,965,967],{"id":966},"getting-started-with-beacon","Getting Started with Beacon",[15,969,970],{},"Beacon is a product analytics platform built for ISVs shipping desktop, web, server, and cloud applications. This guide walks you through going from zero to your first tracked event.",[19,972,974],{"id":973},"prerequisites","Prerequisites",[171,976,977,985,988],{},[174,978,979,980,984],{},"A Beacon account (",[905,981,983],{"href":982},"\u002Fbeacon","start your free trial",")",[174,986,987],{},"Your API key and API base URL (found in your Beacon dashboard under Settings)",[174,989,990],{},"An application built with .NET, C++, or JavaScript\u002FTypeScript",[19,992,994],{"id":993},"quick-start","Quick Start",[24,996,998],{"id":997},"_1-choose-your-sdk","1. Choose Your SDK",[15,1000,1001],{},"Beacon provides native SDKs for three platforms:",[349,1003,1004,1017],{},[352,1005,1006],{},[355,1007,1008,1011,1014],{},[358,1009,1010],{},"Platform",[358,1012,1013],{},"Package",[358,1015,1016],{},"Install Command",[371,1018,1019,1034,1050],{},[355,1020,1021,1024,1029],{},[376,1022,1023],{},".NET",[376,1025,1026],{},[32,1027,1028],{},"SoftAgility.Beacon",[376,1030,1031],{},[32,1032,1033],{},"dotnet add package SoftAgility.Beacon",[355,1035,1036,1039,1044],{},[376,1037,1038],{},"C++",[376,1040,1041],{},[32,1042,1043],{},"beacon_sdk",[376,1045,1046,1047,984],{},"CMake FetchContent (see ",[905,1048,1049],{"href":954},"C++ SDK docs",[355,1051,1052,1055,1060],{},[376,1053,1054],{},"JavaScript\u002FTypeScript",[376,1056,1057],{},[32,1058,1059],{},"@softagility\u002Fbeacon-js",[376,1061,1062],{},[32,1063,1064],{},"npm install @softagility\u002Fbeacon-js",[24,1066,1068],{"id":1067},"_2-initialize-the-sdk","2. Initialize the SDK",[15,1070,1071],{},"Add Beacon to your application startup. Here is a .NET example using dependency injection:",[37,1073,1077],{"className":1074,"code":1075,"language":1076,"meta":42,"style":42},"language-csharp shiki shiki-themes github-dark","services.AddBeacon(options =>\n{\n    options.ApiKey = \"your-api-key\";\n    options.ApiBaseUrl = \"https:\u002F\u002Fapi.beacon.softagility.com\";\n    options.AppName = \"MyApp\";\n    options.AppVersion = \"1.2.0\";\n});\n","csharp",[32,1078,1079,1098,1102,1116,1128,1140,1152],{"__ignoreMap":42},[46,1080,1081,1085,1088,1091,1094],{"class":48,"line":49},[46,1082,1084],{"class":1083},"s95oV","services.",[46,1086,1087],{"class":117},"AddBeacon",[46,1089,1090],{"class":1083},"(",[46,1092,1093],{"class":117},"options",[46,1095,1097],{"class":1096},"snl16"," =>\n",[46,1099,1100],{"class":48,"line":55},[46,1101,215],{"class":1083},[46,1103,1104,1107,1110,1113],{"class":48,"line":61},[46,1105,1106],{"class":1083},"    options.ApiKey ",[46,1108,1109],{"class":1096},"=",[46,1111,1112],{"class":121}," \"your-api-key\"",[46,1114,1115],{"class":1083},";\n",[46,1117,1118,1121,1123,1126],{"class":48,"line":67},[46,1119,1120],{"class":1083},"    options.ApiBaseUrl ",[46,1122,1109],{"class":1096},[46,1124,1125],{"class":121}," \"https:\u002F\u002Fapi.beacon.softagility.com\"",[46,1127,1115],{"class":1083},[46,1129,1130,1133,1135,1138],{"class":48,"line":73},[46,1131,1132],{"class":1083},"    options.AppName ",[46,1134,1109],{"class":1096},[46,1136,1137],{"class":121}," \"MyApp\"",[46,1139,1115],{"class":1083},[46,1141,1142,1145,1147,1150],{"class":48,"line":79},[46,1143,1144],{"class":1083},"    options.AppVersion ",[46,1146,1109],{"class":1096},[46,1148,1149],{"class":121}," \"1.2.0\"",[46,1151,1115],{"class":1083},[46,1153,1154],{"class":48,"line":85},[46,1155,619],{"class":1083},[15,1157,1158],{},"Or initialize directly without DI:",[37,1160,1162],{"className":1074,"code":1161,"language":1076,"meta":42,"style":42},"var tracker = BeaconTracker.Configure(options =>\n{\n    options.ApiKey = \"your-api-key\";\n    options.ApiBaseUrl = \"https:\u002F\u002Fapi.beacon.softagility.com\";\n    options.AppName = \"MyApp\";\n    options.AppVersion = \"1.2.0\";\n});\n",[32,1163,1164,1187,1191,1201,1211,1221,1231],{"__ignoreMap":42},[46,1165,1166,1169,1172,1175,1178,1181,1183,1185],{"class":48,"line":49},[46,1167,1168],{"class":1096},"var",[46,1170,1171],{"class":117}," tracker",[46,1173,1174],{"class":1096}," =",[46,1176,1177],{"class":1083}," BeaconTracker.",[46,1179,1180],{"class":117},"Configure",[46,1182,1090],{"class":1083},[46,1184,1093],{"class":117},[46,1186,1097],{"class":1096},[46,1188,1189],{"class":48,"line":55},[46,1190,215],{"class":1083},[46,1192,1193,1195,1197,1199],{"class":48,"line":61},[46,1194,1106],{"class":1083},[46,1196,1109],{"class":1096},[46,1198,1112],{"class":121},[46,1200,1115],{"class":1083},[46,1202,1203,1205,1207,1209],{"class":48,"line":67},[46,1204,1120],{"class":1083},[46,1206,1109],{"class":1096},[46,1208,1125],{"class":121},[46,1210,1115],{"class":1083},[46,1212,1213,1215,1217,1219],{"class":48,"line":73},[46,1214,1132],{"class":1083},[46,1216,1109],{"class":1096},[46,1218,1137],{"class":121},[46,1220,1115],{"class":1083},[46,1222,1223,1225,1227,1229],{"class":48,"line":79},[46,1224,1144],{"class":1083},[46,1226,1109],{"class":1096},[46,1228,1149],{"class":121},[46,1230,1115],{"class":1083},[46,1232,1233],{"class":48,"line":85},[46,1234,619],{"class":1083},[15,1236,1237],{},"See the full setup guide for your platform:",[171,1239,1240,1246,1250],{},[174,1241,1242],{},[905,1243,1245],{"href":1244},"\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fdotnet",".NET SDK",[174,1247,1248],{},[905,1249,5],{"href":954},[174,1251,1252],{},[905,1253,1255],{"href":1254},"\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fjavascript","JavaScript\u002FTypeScript SDK",[24,1257,1259],{"id":1258},"_3-identify-the-user-and-start-a-session","3. Identify the User and Start a Session",[15,1261,1262],{},"Beacon uses actors to associate events with users or devices. Identify the current actor and start a session:",[37,1264,1266],{"className":1074,"code":1265,"language":1076,"meta":42,"style":42},"tracker.Identify(\"user-123\");\ntracker.StartSession();\n",[32,1267,1268,1284],{"__ignoreMap":42},[46,1269,1270,1273,1276,1278,1281],{"class":48,"line":49},[46,1271,1272],{"class":1083},"tracker.",[46,1274,1275],{"class":117},"Identify",[46,1277,1090],{"class":1083},[46,1279,1280],{"class":121},"\"user-123\"",[46,1282,1283],{"class":1083},");\n",[46,1285,1286,1288,1291],{"class":48,"line":55},[46,1287,1272],{"class":1083},[46,1289,1290],{"class":117},"StartSession",[46,1292,1293],{"class":1083},"();\n",[24,1295,1297],{"id":1296},"_4-track-your-first-event","4. Track Your First Event",[15,1299,1300],{},"Events are organized by category and name:",[37,1302,1304],{"className":1074,"code":1303,"language":1076,"meta":42,"style":42},"tracker.Track(\"reports\", \"report_exported\", new\n{\n    format = \"pdf\",\n    row_count = 1500\n});\n",[32,1305,1306,1329,1333,1346,1356],{"__ignoreMap":42},[46,1307,1308,1310,1313,1315,1318,1321,1324,1326],{"class":48,"line":49},[46,1309,1272],{"class":1083},[46,1311,1312],{"class":117},"Track",[46,1314,1090],{"class":1083},[46,1316,1317],{"class":121},"\"reports\"",[46,1319,1320],{"class":1083},", ",[46,1322,1323],{"class":121},"\"report_exported\"",[46,1325,1320],{"class":1083},[46,1327,1328],{"class":1096},"new\n",[46,1330,1331],{"class":48,"line":55},[46,1332,215],{"class":1083},[46,1334,1335,1338,1340,1343],{"class":48,"line":61},[46,1336,1337],{"class":1083},"    format ",[46,1339,1109],{"class":1096},[46,1341,1342],{"class":121}," \"pdf\"",[46,1344,1345],{"class":1083},",\n",[46,1347,1348,1351,1353],{"class":48,"line":67},[46,1349,1350],{"class":1083},"    row_count ",[46,1352,1109],{"class":1096},[46,1354,1355],{"class":130}," 1500\n",[46,1357,1358],{"class":48,"line":73},[46,1359,619],{"class":1083},[24,1361,1363],{"id":1362},"_5-view-your-data","5. View Your Data",[15,1365,1366],{},"Log in to the Beacon dashboard. Events appear in real time in the Event Explorer. From there you can build funnels, analyze retention, and segment users.",[19,1368,1370],{"id":1369},"environment-collection","Environment Collection",[15,1372,1373],{},"Each SDK automatically collects environment data and sends it as a header with each request. The data varies by platform:",[15,1375,1376],{},[583,1377,1378],{},".NET and C++ SDKs:",[171,1380,1381,1384,1387,1390,1393],{},[174,1382,1383],{},"Operating system and version",[174,1385,1386],{},"Runtime version (.NET version, compiler)",[174,1388,1389],{},"Hardware (CPU, memory, display resolution)",[174,1391,1392],{},"Locale and timezone",[174,1394,1395],{},"Application version",[15,1397,1398],{},[583,1399,1400],{},"JavaScript \u002F TypeScript SDK:",[171,1402,1403,1406,1409,1412,1415],{},[174,1404,1405],{},"Browser name and version",[174,1407,1408],{},"Screen and viewport dimensions",[174,1410,1411],{},"Language and platform",[174,1413,1414],{},"Device type (desktop, mobile, tablet)",[174,1416,1417],{},"Connection type (when available)",[15,1419,1420],{},"No PII is collected. All data is environment and session metadata.",[19,1422,1424],{"id":1423},"offline-behavior","Offline Behavior",[15,1426,1427],{},"The .NET and C++ SDKs include built-in offline persistence via a local SQLite database. If your application loses connectivity, events are queued locally and sync automatically when the connection returns. No data is lost, and the queue persists across application restarts.",[15,1429,1430,1431,1434,1435,1438],{},"The JavaScript SDK uses an in-memory queue with best-effort delivery via ",[32,1432,1433],{},"fetch"," with ",[32,1436,1437],{},"keepalive"," on page unload. Events are buffered while the tab is open but do not persist across page reloads.",[19,1440,899],{"id":898},[171,1442,1443,1453,1459],{},[174,1444,1445,1446,1448,1449,1448,1451],{},"Read the SDK guide for your platform: ",[905,1447,1023],{"href":1244}," | ",[905,1450,1038],{"href":954},[905,1452,1054],{"href":1254},[174,1454,1455,1456,1458],{},"Review the ",[905,1457,915],{"href":914}," for direct API integration",[174,1460,1461,1462,923],{},"See ",[905,1463,1464],{"href":921},"pricing",[925,1466,1467],{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}",{"title":42,"searchDepth":55,"depth":55,"links":1469},[1470,1471,1478,1479,1480],{"id":973,"depth":55,"text":974},{"id":993,"depth":55,"text":994,"children":1472},[1473,1474,1475,1476,1477],{"id":997,"depth":61,"text":998},{"id":1067,"depth":61,"text":1068},{"id":1258,"depth":61,"text":1259},{"id":1296,"depth":61,"text":1297},{"id":1362,"depth":61,"text":1363},{"id":1369,"depth":55,"text":1370},{"id":1423,"depth":55,"text":1424},{"id":898,"depth":55,"text":899},"Get up and running with Beacon product analytics in under 30 minutes.",{},"Overview",{"title":908,"description":1481},"beacon\u002Fdocs\u002Fgetting-started","o6q3Bj1EMLJi2p_IF-_7B4ceVSbAVKDZhrAbgvzQrHU",{"id":1488,"title":1245,"body":1489,"description":2712,"extension":952,"meta":2713,"navigation":94,"order":243,"path":1244,"published":94,"section":955,"seo":2714,"stem":2715,"__hash__":2716},"beaconDocs\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fdotnet.md",{"type":7,"value":1490,"toc":2686},[1491,1495,1498,1500,1503,1522,1525,1539,1541,1552,1554,1558,1564,1628,1632,1642,1712,1714,1915,1917,1920,1937,1949,1951,1957,1959,2014,2016,2070,2074,2085,2087,2090,2145,2147,2150,2216,2226,2230,2236,2242,2244,2253,2271,2273,2291,2293,2300,2313,2317,2320,2339,2341,2346,2350,2362,2392,2396,2667,2669,2683],[10,1492,1494],{"id":1493},"beacon-net-sdk","Beacon .NET SDK",[15,1496,1497],{},"The Beacon .NET SDK provides native integration for desktop (WPF, WinForms, MAUI), server (ASP.NET Core, Windows Services), and console applications.",[19,1499,22],{"id":21},[15,1501,1502],{},"Install via NuGet:",[37,1504,1506],{"className":108,"code":1505,"language":110,"meta":42,"style":42},"dotnet add package SoftAgility.Beacon\n",[32,1507,1508],{"__ignoreMap":42},[46,1509,1510,1513,1516,1519],{"class":48,"line":49},[46,1511,1512],{"class":117},"dotnet",[46,1514,1515],{"class":121}," add",[46,1517,1518],{"class":121}," package",[46,1520,1521],{"class":121}," SoftAgility.Beacon\n",[15,1523,1524],{},"Or via the Package Manager Console:",[37,1526,1530],{"className":1527,"code":1528,"language":1529,"meta":42,"style":42},"language-powershell shiki shiki-themes github-dark","Install-Package SoftAgility.Beacon\n","powershell",[32,1531,1532],{"__ignoreMap":42},[46,1533,1534,1537],{"class":48,"line":49},[46,1535,1536],{"class":130},"Install-Package",[46,1538,1521],{"class":1083},[24,1540,169],{"id":168},[171,1542,1543,1546,1549],{},[174,1544,1545],{},".NET 8.0 or later",[174,1547,1548],{},"Windows, Linux, or macOS",[174,1550,1551],{},"No additional dependencies",[19,1553,189],{"id":188},[24,1555,1557],{"id":1556},"aspnet-core-host-builder","ASP.NET Core \u002F Host Builder",[15,1559,1560,1561,35],{},"Register Beacon with dependency injection to resolve ",[32,1562,1563],{},"IBeaconTracker",[37,1565,1566],{"className":1074,"code":1075,"language":1076,"meta":42,"style":42},[32,1567,1568,1580,1584,1594,1604,1614,1624],{"__ignoreMap":42},[46,1569,1570,1572,1574,1576,1578],{"class":48,"line":49},[46,1571,1084],{"class":1083},[46,1573,1087],{"class":117},[46,1575,1090],{"class":1083},[46,1577,1093],{"class":117},[46,1579,1097],{"class":1096},[46,1581,1582],{"class":48,"line":55},[46,1583,215],{"class":1083},[46,1585,1586,1588,1590,1592],{"class":48,"line":61},[46,1587,1106],{"class":1083},[46,1589,1109],{"class":1096},[46,1591,1112],{"class":121},[46,1593,1115],{"class":1083},[46,1595,1596,1598,1600,1602],{"class":48,"line":67},[46,1597,1120],{"class":1083},[46,1599,1109],{"class":1096},[46,1601,1125],{"class":121},[46,1603,1115],{"class":1083},[46,1605,1606,1608,1610,1612],{"class":48,"line":73},[46,1607,1132],{"class":1083},[46,1609,1109],{"class":1096},[46,1611,1137],{"class":121},[46,1613,1115],{"class":1083},[46,1615,1616,1618,1620,1622],{"class":48,"line":79},[46,1617,1144],{"class":1083},[46,1619,1109],{"class":1096},[46,1621,1149],{"class":121},[46,1623,1115],{"class":1083},[46,1625,1626],{"class":48,"line":85},[46,1627,619],{"class":1083},[24,1629,1631],{"id":1630},"manual-initialization","Manual Initialization",[15,1633,1634,1635,1637,1638,1641],{},"For applications without dependency injection, use the static ",[32,1636,1180],{}," method. This creates a singleton ",[32,1639,1640],{},"BeaconTracker"," instance:",[37,1643,1644],{"className":1074,"code":1161,"language":1076,"meta":42,"style":42},[32,1645,1646,1664,1668,1678,1688,1698,1708],{"__ignoreMap":42},[46,1647,1648,1650,1652,1654,1656,1658,1660,1662],{"class":48,"line":49},[46,1649,1168],{"class":1096},[46,1651,1171],{"class":117},[46,1653,1174],{"class":1096},[46,1655,1177],{"class":1083},[46,1657,1180],{"class":117},[46,1659,1090],{"class":1083},[46,1661,1093],{"class":117},[46,1663,1097],{"class":1096},[46,1665,1666],{"class":48,"line":55},[46,1667,215],{"class":1083},[46,1669,1670,1672,1674,1676],{"class":48,"line":61},[46,1671,1106],{"class":1083},[46,1673,1109],{"class":1096},[46,1675,1112],{"class":121},[46,1677,1115],{"class":1083},[46,1679,1680,1682,1684,1686],{"class":48,"line":67},[46,1681,1120],{"class":1083},[46,1683,1109],{"class":1096},[46,1685,1125],{"class":121},[46,1687,1115],{"class":1083},[46,1689,1690,1692,1694,1696],{"class":48,"line":73},[46,1691,1132],{"class":1083},[46,1693,1109],{"class":1096},[46,1695,1137],{"class":121},[46,1697,1115],{"class":1083},[46,1699,1700,1702,1704,1706],{"class":48,"line":79},[46,1701,1144],{"class":1083},[46,1703,1109],{"class":1096},[46,1705,1149],{"class":121},[46,1707,1115],{"class":1083},[46,1709,1710],{"class":48,"line":85},[46,1711,619],{"class":1083},[24,1713,347],{"id":346},[349,1715,1716,1728],{},[352,1717,1718],{},[355,1719,1720,1722,1724,1726],{},[358,1721,360],{},[358,1723,363],{},[358,1725,366],{},[358,1727,369],{},[371,1729,1730,1746,1761,1777,1793,1810,1828,1845,1862,1879,1896],{},[355,1731,1732,1737,1742,1744],{},[376,1733,1734],{},[32,1735,1736],{},"ApiKey",[376,1738,1739],{},[32,1740,1741],{},"string",[376,1743,388],{},[376,1745,391],{},[355,1747,1748,1753,1757,1759],{},[376,1749,1750],{},[32,1751,1752],{},"ApiBaseUrl",[376,1754,1755],{},[32,1756,1741],{},[376,1758,388],{},[376,1760,407],{},[355,1762,1763,1768,1772,1774],{},[376,1764,1765],{},[32,1766,1767],{},"AppName",[376,1769,1770],{},[32,1771,1741],{},[376,1773,388],{},[376,1775,1776],{},"Your application name, max 128 chars (required)",[355,1778,1779,1784,1788,1790],{},[376,1780,1781],{},[32,1782,1783],{},"AppVersion",[376,1785,1786],{},[32,1787,1741],{},[376,1789,388],{},[376,1791,1792],{},"Your application version, max 256 chars (required)",[355,1794,1795,1800,1804,1808],{},[376,1796,1797],{},[32,1798,1799],{},"Enabled",[376,1801,1802],{},[32,1803,451],{},[376,1805,1806],{},[32,1807,456],{},[376,1809,459],{},[355,1811,1812,1817,1821,1825],{},[376,1813,1814],{},[32,1815,1816],{},"FlushIntervalSeconds",[376,1818,1819],{},[32,1820,471],{},[376,1822,1823],{},[32,1824,476],{},[376,1826,1827],{},"How often to send batched events (1-3600)",[355,1829,1830,1835,1839,1843],{},[376,1831,1832],{},[32,1833,1834],{},"MaxBatchSize",[376,1836,1837],{},[32,1838,471],{},[376,1840,1841],{},[32,1842,495],{},[376,1844,498],{},[355,1846,1847,1852,1856,1860],{},[376,1848,1849],{},[32,1850,1851],{},"MaxQueueSizeMb",[376,1853,1854],{},[32,1855,471],{},[376,1857,1858],{},[32,1859,514],{},[376,1861,517],{},[355,1863,1864,1869,1873,1877],{},[376,1865,1866],{},[32,1867,1868],{},"MaxBreadcrumbs",[376,1870,1871],{},[32,1872,471],{},[376,1874,1875],{},[32,1876,495],{},[376,1878,535],{},[355,1880,1881,1886,1891,1893],{},[376,1882,1883],{},[32,1884,1885],{},"Events",[376,1887,1888],{},[32,1889,1890],{},"EventDefinitionBuilder",[376,1892,388],{},[376,1894,1895],{},"Builder for registering known events",[355,1897,1898,1903,1908,1913],{},[376,1899,1900],{},[32,1901,1902],{},"Logger",[376,1904,1905],{},[32,1906,1907],{},"ILogger?",[376,1909,1910],{},[32,1911,1912],{},"null",[376,1914,555],{},[19,1916,559],{"id":558},[15,1918,1919],{},"Before tracking events or sessions, identify the current actor (user or device):",[37,1921,1923],{"className":1074,"code":1922,"language":1076,"meta":42,"style":42},"tracker.Identify(\"user-123\");\n",[32,1924,1925],{"__ignoreMap":42},[46,1926,1927,1929,1931,1933,1935],{"class":48,"line":49},[46,1928,1272],{"class":1083},[46,1930,1275],{"class":117},[46,1932,1090],{"class":1083},[46,1934,1280],{"class":121},[46,1936,1283],{"class":1083},[15,1938,1939,1940,1320,1942,1944,1945,1948],{},"Actor IDs can be up to 512 characters. Once identified, all subsequent ",[32,1941,1312],{},[32,1943,1290],{},", and ",[32,1946,1947],{},"TrackException"," calls use this actor. You can also pass an explicit actor ID to any tracking method.",[19,1950,578],{"id":577},[15,1952,581,1953,586,1955,590],{},[583,1954,585],{},[583,1956,589],{},[24,1958,594],{"id":593},[37,1960,1962],{"className":1074,"code":1961,"language":1076,"meta":42,"style":42},"tracker.Track(\"ui\", \"button_clicked\", new\n{\n    button_name = \"export\",\n    screen = \"dashboard\"\n});\n",[32,1963,1964,1984,1988,2000,2010],{"__ignoreMap":42},[46,1965,1966,1968,1970,1972,1975,1977,1980,1982],{"class":48,"line":49},[46,1967,1272],{"class":1083},[46,1969,1312],{"class":117},[46,1971,1090],{"class":1083},[46,1973,1974],{"class":121},"\"ui\"",[46,1976,1320],{"class":1083},[46,1978,1979],{"class":121},"\"button_clicked\"",[46,1981,1320],{"class":1083},[46,1983,1328],{"class":1096},[46,1985,1986],{"class":48,"line":55},[46,1987,215],{"class":1083},[46,1989,1990,1993,1995,1998],{"class":48,"line":61},[46,1991,1992],{"class":1083},"    button_name ",[46,1994,1109],{"class":1096},[46,1996,1997],{"class":121}," \"export\"",[46,1999,1345],{"class":1083},[46,2001,2002,2005,2007],{"class":48,"line":67},[46,2003,2004],{"class":1083},"    screen ",[46,2006,1109],{"class":1096},[46,2008,2009],{"class":121}," \"dashboard\"\n",[46,2011,2012],{"class":48,"line":73},[46,2013,619],{"class":1083},[24,2015,623],{"id":622},[37,2017,2019],{"className":1074,"code":2018,"language":1076,"meta":42,"style":42},"tracker.Track(\"reports\", \"report_exported\", \"user-456\", new\n{\n    format = \"pdf\",\n    row_count = 1500\n});\n",[32,2020,2021,2044,2048,2058,2066],{"__ignoreMap":42},[46,2022,2023,2025,2027,2029,2031,2033,2035,2037,2040,2042],{"class":48,"line":49},[46,2024,1272],{"class":1083},[46,2026,1312],{"class":117},[46,2028,1090],{"class":1083},[46,2030,1317],{"class":121},[46,2032,1320],{"class":1083},[46,2034,1323],{"class":121},[46,2036,1320],{"class":1083},[46,2038,2039],{"class":121},"\"user-456\"",[46,2041,1320],{"class":1083},[46,2043,1328],{"class":1096},[46,2045,2046],{"class":48,"line":55},[46,2047,215],{"class":1083},[46,2049,2050,2052,2054,2056],{"class":48,"line":61},[46,2051,1337],{"class":1083},[46,2053,1109],{"class":1096},[46,2055,1342],{"class":121},[46,2057,1345],{"class":1083},[46,2059,2060,2062,2064],{"class":48,"line":67},[46,2061,1350],{"class":1083},[46,2063,1109],{"class":1096},[46,2065,1355],{"class":130},[46,2067,2068],{"class":48,"line":73},[46,2069,619],{"class":1083},[24,2071,2073],{"id":2072},"event-limits","Event Limits",[171,2075,2076,2079,2082],{},[174,2077,2078],{},"Category: max 128 characters",[174,2080,2081],{},"Name: max 256 characters",[174,2083,2084],{},"Actor ID: max 512 characters",[19,2086,651],{"id":650},[15,2088,2089],{},"Sessions group related events and track duration.",[37,2091,2093],{"className":1074,"code":2092,"language":1076,"meta":42,"style":42},"\u002F\u002F Start a session (uses the identified actor)\ntracker.StartSession();\n\n\u002F\u002F Or start with an explicit actor ID\ntracker.StartSession(\"user-123\");\n\n\u002F\u002F End the current session\ntracker.EndSession();\n",[32,2094,2095,2100,2108,2112,2116,2128,2132,2136],{"__ignoreMap":42},[46,2096,2097],{"class":48,"line":49},[46,2098,661],{"class":2099},"sAwPA",[46,2101,2102,2104,2106],{"class":48,"line":55},[46,2103,1272],{"class":1083},[46,2105,1290],{"class":117},[46,2107,1293],{"class":1083},[46,2109,2110],{"class":48,"line":61},[46,2111,95],{"emptyLinePlaceholder":94},[46,2113,2114],{"class":48,"line":67},[46,2115,675],{"class":2099},[46,2117,2118,2120,2122,2124,2126],{"class":48,"line":73},[46,2119,1272],{"class":1083},[46,2121,1290],{"class":117},[46,2123,1090],{"class":1083},[46,2125,1280],{"class":121},[46,2127,1283],{"class":1083},[46,2129,2130],{"class":48,"line":79},[46,2131,95],{"emptyLinePlaceholder":94},[46,2133,2134],{"class":48,"line":85},[46,2135,689],{"class":2099},[46,2137,2138,2140,2143],{"class":48,"line":91},[46,2139,1272],{"class":1083},[46,2141,2142],{"class":117},"EndSession",[46,2144,1293],{"class":1083},[19,2146,698],{"id":697},[15,2148,2149],{},"Track handled or unhandled exceptions with full stack traces. Beacon automatically fingerprints exceptions by type and stack trace for grouping.",[37,2151,2153],{"className":1074,"code":2152,"language":1076,"meta":42,"style":42},"try\n{\n    ProcessOrder(order);\n}\ncatch (Exception ex)\n{\n    tracker.TrackException(ex, ExceptionSeverity.NonFatal);\n    throw;\n}\n",[32,2154,2155,2159,2163,2171,2175,2191,2195,2205,2212],{"__ignoreMap":42},[46,2156,2157],{"class":48,"line":49},[46,2158,715],{"class":1096},[46,2160,2161],{"class":48,"line":55},[46,2162,215],{"class":1083},[46,2164,2165,2168],{"class":48,"line":61},[46,2166,2167],{"class":117},"    ProcessOrder",[46,2169,2170],{"class":1083},"(order);\n",[46,2172,2173],{"class":48,"line":67},[46,2174,297],{"class":1083},[46,2176,2177,2180,2183,2186,2189],{"class":48,"line":73},[46,2178,2179],{"class":1096},"catch",[46,2181,2182],{"class":1083}," (",[46,2184,2185],{"class":117},"Exception",[46,2187,2188],{"class":117}," ex",[46,2190,82],{"class":1083},[46,2192,2193],{"class":48,"line":79},[46,2194,215],{"class":1083},[46,2196,2197,2200,2202],{"class":48,"line":85},[46,2198,2199],{"class":1083},"    tracker.",[46,2201,1947],{"class":117},[46,2203,2204],{"class":1083},"(ex, ExceptionSeverity.NonFatal);\n",[46,2206,2207,2210],{"class":48,"line":91},[46,2208,2209],{"class":1096},"    throw",[46,2211,1115],{"class":1083},[46,2213,2214],{"class":48,"line":98},[46,2215,297],{"class":1083},[15,2217,2218,2219,586,2222,2225],{},"Severity options are ",[32,2220,2221],{},"ExceptionSeverity.Fatal",[32,2223,2224],{},"ExceptionSeverity.NonFatal",". Recent tracking calls are automatically attached as breadcrumbs to provide context.",[19,2227,2229],{"id":2228},"breadcrumbs","Breadcrumbs",[15,2231,2232,2233,2235],{},"The SDK maintains a circular ring buffer of recent ",[32,2234,1312],{}," calls. When an exception is reported, these breadcrumbs are attached automatically, giving you a timeline of what happened before the error.",[15,2237,2238,2239,2241],{},"Configure the buffer size with ",[32,2240,1868],{}," (default 25, max 200). Set to 0 to disable.",[19,2243,765],{"id":764},[15,2245,2246,2247,2249,2250,2252],{},"Events are batched and sent on a timer (",[32,2248,1816],{},") or when the batch reaches ",[32,2251,1834],{},". To flush manually:",[37,2254,2256],{"className":1074,"code":2255,"language":1076,"meta":42,"style":42},"await tracker.FlushAsync();\n",[32,2257,2258],{"__ignoreMap":42},[46,2259,2260,2263,2266,2269],{"class":48,"line":49},[46,2261,2262],{"class":1096},"await",[46,2264,2265],{"class":1083}," tracker.",[46,2267,2268],{"class":117},"FlushAsync",[46,2270,1293],{"class":1083},[15,2272,780],{},[37,2274,2276],{"className":1074,"code":2275,"language":1076,"meta":42,"style":42},"FlushStatus status = tracker.LastFlushStatus;\n",[32,2277,2278],{"__ignoreMap":42},[46,2279,2280,2283,2286,2288],{"class":48,"line":49},[46,2281,2282],{"class":117},"FlushStatus",[46,2284,2285],{"class":117}," status",[46,2287,1174],{"class":1096},[46,2289,2290],{"class":1083}," tracker.LastFlushStatus;\n",[19,2292,793],{"id":792},[15,2294,2295,2296,2299],{},"The SDK queues events in a local SQLite database at ",[32,2297,2298],{},"%LOCALAPPDATA%\\SoftAgility\\Beacon\\{AppName}\\queue.db",". Events persist across application restarts and sync automatically when connectivity returns.",[171,2301,2302,2307,2310],{},[174,2303,2304,2305,984],{},"FIFO queue with configurable maximum size (",[32,2306,1851],{},[174,2308,2309],{},"No data is lost during transient network failures",[174,2311,2312],{},"Background timer handles automatic flushing",[19,2314,2316],{"id":2315},"event-manifest","Event Manifest",[15,2318,2319],{},"Export a JSON manifest of your registered events for import into the Beacon portal's allowlist page:",[37,2321,2323],{"className":1074,"code":2322,"language":1076,"meta":42,"style":42},"tracker.ExportEventManifest(\"events.json\");\n",[32,2324,2325],{"__ignoreMap":42},[46,2326,2327,2329,2332,2334,2337],{"class":48,"line":49},[46,2328,1272],{"class":1083},[46,2330,2331],{"class":117},"ExportEventManifest",[46,2333,1090],{"class":1083},[46,2335,2336],{"class":121},"\"events.json\"",[46,2338,1283],{"class":1083},[19,2340,838],{"id":837},[15,2342,2343,2345],{},[32,2344,1640],{}," is fully thread-safe. A single instance can be shared across your application and called from any thread.",[19,2347,2349],{"id":2348},"disposal","Disposal",[15,2351,2352,2354,2355,586,2358,2361],{},[32,2353,1640],{}," implements both ",[32,2356,2357],{},"IDisposable",[32,2359,2360],{},"IAsyncDisposable",". Dispose when your application shuts down to flush pending events:",[37,2363,2365],{"className":1074,"code":2364,"language":1076,"meta":42,"style":42},"tracker.Dispose();\n\u002F\u002F or\nawait tracker.DisposeAsync();\n",[32,2366,2367,2376,2381],{"__ignoreMap":42},[46,2368,2369,2371,2374],{"class":48,"line":49},[46,2370,1272],{"class":1083},[46,2372,2373],{"class":117},"Dispose",[46,2375,1293],{"class":1083},[46,2377,2378],{"class":48,"line":55},[46,2379,2380],{"class":2099},"\u002F\u002F or\n",[46,2382,2383,2385,2387,2390],{"class":48,"line":61},[46,2384,2262],{"class":1096},[46,2386,2265],{"class":1083},[46,2388,2389],{"class":117},"DisposeAsync",[46,2391,1293],{"class":1083},[19,2393,2395],{"id":2394},"wpf-example","WPF Example",[37,2397,2399],{"className":1074,"code":2398,"language":1076,"meta":42,"style":42},"public partial class App : Application\n{\n    private IBeaconTracker _tracker;\n\n    protected override void OnStartup(StartupEventArgs e)\n    {\n        base.OnStartup(e);\n\n        _tracker = BeaconTracker.Configure(options =>\n        {\n            options.ApiKey = \"your-api-key\";\n            options.ApiBaseUrl = \"https:\u002F\u002Fapi.beacon.softagility.com\";\n            options.AppName = \"MyDesktopApp\";\n            options.AppVersion = \"2.1.0\";\n        });\n\n        _tracker.Identify(\"device-\" + Environment.MachineName);\n        _tracker.StartSession();\n    }\n\n    protected override void OnExit(ExitEventArgs e)\n    {\n        _tracker.EndSession();\n        _tracker.Dispose();\n        base.OnExit(e);\n    }\n}\n",[32,2400,2401,2421,2425,2438,2442,2466,2471,2484,2488,2505,2510,2521,2532,2544,2556,2561,2565,2583,2591,2596,2601,2622,2627,2636,2645,2657,2662],{"__ignoreMap":42},[46,2402,2403,2406,2409,2412,2415,2418],{"class":48,"line":49},[46,2404,2405],{"class":1096},"public",[46,2407,2408],{"class":1096}," partial",[46,2410,2411],{"class":1096}," class",[46,2413,2414],{"class":117}," App",[46,2416,2417],{"class":1083}," : ",[46,2419,2420],{"class":117},"Application\n",[46,2422,2423],{"class":48,"line":55},[46,2424,215],{"class":1083},[46,2426,2427,2430,2433,2436],{"class":48,"line":61},[46,2428,2429],{"class":1096},"    private",[46,2431,2432],{"class":117}," IBeaconTracker",[46,2434,2435],{"class":117}," _tracker",[46,2437,1115],{"class":1083},[46,2439,2440],{"class":48,"line":67},[46,2441,95],{"emptyLinePlaceholder":94},[46,2443,2444,2447,2450,2453,2456,2458,2461,2464],{"class":48,"line":73},[46,2445,2446],{"class":1096},"    protected",[46,2448,2449],{"class":1096}," override",[46,2451,2452],{"class":1096}," void",[46,2454,2455],{"class":117}," OnStartup",[46,2457,1090],{"class":1083},[46,2459,2460],{"class":117},"StartupEventArgs",[46,2462,2463],{"class":117}," e",[46,2465,82],{"class":1083},[46,2467,2468],{"class":48,"line":79},[46,2469,2470],{"class":1083},"    {\n",[46,2472,2473,2476,2478,2481],{"class":48,"line":85},[46,2474,2475],{"class":130},"        base",[46,2477,761],{"class":1083},[46,2479,2480],{"class":117},"OnStartup",[46,2482,2483],{"class":1083},"(e);\n",[46,2485,2486],{"class":48,"line":91},[46,2487,95],{"emptyLinePlaceholder":94},[46,2489,2490,2493,2495,2497,2499,2501,2503],{"class":48,"line":98},[46,2491,2492],{"class":1083},"        _tracker ",[46,2494,1109],{"class":1096},[46,2496,1177],{"class":1083},[46,2498,1180],{"class":117},[46,2500,1090],{"class":1083},[46,2502,1093],{"class":117},[46,2504,1097],{"class":1096},[46,2506,2507],{"class":48,"line":243},[46,2508,2509],{"class":1083},"        {\n",[46,2511,2512,2515,2517,2519],{"class":48,"line":249},[46,2513,2514],{"class":1083},"            options.ApiKey ",[46,2516,1109],{"class":1096},[46,2518,1112],{"class":121},[46,2520,1115],{"class":1083},[46,2522,2523,2526,2528,2530],{"class":48,"line":254},[46,2524,2525],{"class":1083},"            options.ApiBaseUrl ",[46,2527,1109],{"class":1096},[46,2529,1125],{"class":121},[46,2531,1115],{"class":1083},[46,2533,2534,2537,2539,2542],{"class":48,"line":260},[46,2535,2536],{"class":1083},"            options.AppName ",[46,2538,1109],{"class":1096},[46,2540,2541],{"class":121}," \"MyDesktopApp\"",[46,2543,1115],{"class":1083},[46,2545,2546,2549,2551,2554],{"class":48,"line":266},[46,2547,2548],{"class":1083},"            options.AppVersion ",[46,2550,1109],{"class":1096},[46,2552,2553],{"class":121}," \"2.1.0\"",[46,2555,1115],{"class":1083},[46,2557,2558],{"class":48,"line":271},[46,2559,2560],{"class":1083},"        });\n",[46,2562,2563],{"class":48,"line":277},[46,2564,95],{"emptyLinePlaceholder":94},[46,2566,2567,2570,2572,2574,2577,2580],{"class":48,"line":282},[46,2568,2569],{"class":1083},"        _tracker.",[46,2571,1275],{"class":117},[46,2573,1090],{"class":1083},[46,2575,2576],{"class":121},"\"device-\"",[46,2578,2579],{"class":1096}," +",[46,2581,2582],{"class":1083}," Environment.MachineName);\n",[46,2584,2585,2587,2589],{"class":48,"line":288},[46,2586,2569],{"class":1083},[46,2588,1290],{"class":117},[46,2590,1293],{"class":1083},[46,2592,2593],{"class":48,"line":294},[46,2594,2595],{"class":1083},"    }\n",[46,2597,2599],{"class":48,"line":2598},20,[46,2600,95],{"emptyLinePlaceholder":94},[46,2602,2604,2606,2608,2610,2613,2615,2618,2620],{"class":48,"line":2603},21,[46,2605,2446],{"class":1096},[46,2607,2449],{"class":1096},[46,2609,2452],{"class":1096},[46,2611,2612],{"class":117}," OnExit",[46,2614,1090],{"class":1083},[46,2616,2617],{"class":117},"ExitEventArgs",[46,2619,2463],{"class":117},[46,2621,82],{"class":1083},[46,2623,2625],{"class":48,"line":2624},22,[46,2626,2470],{"class":1083},[46,2628,2630,2632,2634],{"class":48,"line":2629},23,[46,2631,2569],{"class":1083},[46,2633,2142],{"class":117},[46,2635,1293],{"class":1083},[46,2637,2639,2641,2643],{"class":48,"line":2638},24,[46,2640,2569],{"class":1083},[46,2642,2373],{"class":117},[46,2644,1293],{"class":1083},[46,2646,2648,2650,2652,2655],{"class":48,"line":2647},25,[46,2649,2475],{"class":130},[46,2651,761],{"class":1083},[46,2653,2654],{"class":117},"OnExit",[46,2656,2483],{"class":1083},[46,2658,2660],{"class":48,"line":2659},26,[46,2661,2595],{"class":1083},[46,2663,2665],{"class":48,"line":2664},27,[46,2666,297],{"class":1083},[19,2668,899],{"id":898},[171,2670,2671,2675,2679],{},[174,2672,2673,909],{},[905,2674,908],{"href":907},[174,2676,2677,916],{},[905,2678,915],{"href":914},[174,2680,2681,923],{},[905,2682,922],{"href":921},[925,2684,2685],{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":42,"searchDepth":55,"depth":55,"links":2687},[2688,2691,2696,2697,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711],{"id":21,"depth":55,"text":22,"children":2689},[2690],{"id":168,"depth":61,"text":169},{"id":188,"depth":55,"text":189,"children":2692},[2693,2694,2695],{"id":1556,"depth":61,"text":1557},{"id":1630,"depth":61,"text":1631},{"id":346,"depth":61,"text":347},{"id":558,"depth":55,"text":559},{"id":577,"depth":55,"text":578,"children":2698},[2699,2700,2701],{"id":593,"depth":61,"text":594},{"id":622,"depth":61,"text":623},{"id":2072,"depth":61,"text":2073},{"id":650,"depth":55,"text":651},{"id":697,"depth":55,"text":698},{"id":2228,"depth":55,"text":2229},{"id":764,"depth":55,"text":765},{"id":792,"depth":55,"text":793},{"id":2315,"depth":55,"text":2316},{"id":837,"depth":55,"text":838},{"id":2348,"depth":55,"text":2349},{"id":2394,"depth":55,"text":2395},{"id":898,"depth":55,"text":899},"Integrate Beacon product analytics into .NET desktop, server, and cloud applications.",{},{"title":1245,"description":2712},"beacon\u002Fdocs\u002Fsdk\u002Fdotnet","Dx55dovfMBMMODJsAcTeP63T1EDDDcqAHgyw7fpnspw",{"id":4,"title":5,"body":2718,"description":951,"extension":952,"meta":3413,"navigation":94,"order":249,"path":954,"published":94,"section":955,"seo":3414,"stem":957,"__hash__":958},{"type":7,"value":2719,"toc":3390},[2720,2722,2724,2726,2728,2732,2772,2774,2814,2816,2818,2828,2830,2910,2914,2946,2948,3116,3118,3120,3128,3130,3132,3138,3140,3160,3162,3182,3184,3220,3222,3226,3266,3272,3274,3276,3284,3286,3294,3296,3298,3306,3308,3312,3320,3324,3326,3330,3332,3336,3372,3374,3388],[10,2721,13],{"id":12},[15,2723,17],{},[19,2725,22],{"id":21},[24,2727,27],{"id":26},[15,2729,30,2730,35],{},[32,2731,34],{},[37,2733,2734],{"className":39,"code":40,"language":41,"meta":42,"style":42},[32,2735,2736,2740,2744,2748,2752,2756,2760,2764,2768],{"__ignoreMap":42},[46,2737,2738],{"class":48,"line":49},[46,2739,52],{},[46,2741,2742],{"class":48,"line":55},[46,2743,58],{},[46,2745,2746],{"class":48,"line":61},[46,2747,64],{},[46,2749,2750],{"class":48,"line":67},[46,2751,70],{},[46,2753,2754],{"class":48,"line":73},[46,2755,76],{},[46,2757,2758],{"class":48,"line":79},[46,2759,82],{},[46,2761,2762],{"class":48,"line":85},[46,2763,88],{},[46,2765,2766],{"class":48,"line":91},[46,2767,95],{"emptyLinePlaceholder":94},[46,2769,2770],{"class":48,"line":98},[46,2771,101],{},[24,2773,105],{"id":104},[37,2775,2776],{"className":108,"code":109,"language":110,"meta":42,"style":42},[32,2777,2778,2786,2792,2802],{"__ignoreMap":42},[46,2779,2780,2782,2784],{"class":48,"line":49},[46,2781,118],{"class":117},[46,2783,122],{"class":121},[46,2785,125],{"class":121},[46,2787,2788,2790],{"class":48,"line":55},[46,2789,131],{"class":130},[46,2791,134],{"class":121},[46,2793,2794,2796,2798,2800],{"class":48,"line":61},[46,2795,41],{"class":117},[46,2797,141],{"class":130},[46,2799,144],{"class":121},[46,2801,147],{"class":130},[46,2803,2804,2806,2808,2810,2812],{"class":48,"line":67},[46,2805,41],{"class":117},[46,2807,154],{"class":130},[46,2809,144],{"class":121},[46,2811,159],{"class":130},[46,2813,162],{"class":121},[15,2815,165],{},[24,2817,169],{"id":168},[171,2819,2820,2822,2824,2826],{},[174,2821,176],{},[174,2823,179],{},[174,2825,182],{},[174,2827,185],{},[19,2829,189],{"id":188},[37,2831,2832],{"className":192,"code":193,"language":194,"meta":42,"style":42},[32,2833,2834,2838,2842,2846,2850,2854,2858,2862,2866,2870,2874,2878,2882,2886,2890,2894,2898,2902,2906],{"__ignoreMap":42},[46,2835,2836],{"class":48,"line":49},[46,2837,201],{},[46,2839,2840],{"class":48,"line":55},[46,2841,95],{"emptyLinePlaceholder":94},[46,2843,2844],{"class":48,"line":61},[46,2845,210],{},[46,2847,2848],{"class":48,"line":67},[46,2849,215],{},[46,2851,2852],{"class":48,"line":73},[46,2853,220],{},[46,2855,2856],{"class":48,"line":79},[46,2857,225],{},[46,2859,2860],{"class":48,"line":85},[46,2861,230],{},[46,2863,2864],{"class":48,"line":91},[46,2865,235],{},[46,2867,2868],{"class":48,"line":98},[46,2869,240],{},[46,2871,2872],{"class":48,"line":243},[46,2873,246],{},[46,2875,2876],{"class":48,"line":249},[46,2877,95],{"emptyLinePlaceholder":94},[46,2879,2880],{"class":48,"line":254},[46,2881,257],{},[46,2883,2884],{"class":48,"line":260},[46,2885,263],{},[46,2887,2888],{"class":48,"line":266},[46,2889,95],{"emptyLinePlaceholder":94},[46,2891,2892],{"class":48,"line":271},[46,2893,274],{},[46,2895,2896],{"class":48,"line":277},[46,2897,95],{"emptyLinePlaceholder":94},[46,2899,2900],{"class":48,"line":282},[46,2901,285],{},[46,2903,2904],{"class":48,"line":288},[46,2905,291],{},[46,2907,2908],{"class":48,"line":294},[46,2909,297],{},[15,2911,300,2912,304],{},[32,2913,303],{},[37,2915,2916],{"className":192,"code":307,"language":194,"meta":42,"style":42},[32,2917,2918,2922,2926,2930,2934,2938,2942],{"__ignoreMap":42},[46,2919,2920],{"class":48,"line":49},[46,2921,314],{},[46,2923,2924],{"class":48,"line":55},[46,2925,319],{},[46,2927,2928],{"class":48,"line":61},[46,2929,324],{},[46,2931,2932],{"class":48,"line":67},[46,2933,329],{},[46,2935,2936],{"class":48,"line":73},[46,2937,334],{},[46,2939,2940],{"class":48,"line":79},[46,2941,95],{"emptyLinePlaceholder":94},[46,2943,2944],{"class":48,"line":85},[46,2945,343],{},[24,2947,347],{"id":346},[349,2949,2950,2962],{},[352,2951,2952],{},[355,2953,2954,2956,2958,2960],{},[358,2955,360],{},[358,2957,363],{},[358,2959,366],{},[358,2961,369],{},[371,2963,2964,2978,2992,3006,3020,3036,3052,3068,3084,3100],{},[355,2965,2966,2970,2974,2976],{},[376,2967,2968],{},[32,2969,380],{},[376,2971,2972],{},[32,2973,385],{},[376,2975,388],{},[376,2977,391],{},[355,2979,2980,2984,2988,2990],{},[376,2981,2982],{},[32,2983,398],{},[376,2985,2986],{},[32,2987,385],{},[376,2989,388],{},[376,2991,407],{},[355,2993,2994,2998,3002,3004],{},[376,2995,2996],{},[32,2997,414],{},[376,2999,3000],{},[32,3001,385],{},[376,3003,388],{},[376,3005,423],{},[355,3007,3008,3012,3016,3018],{},[376,3009,3010],{},[32,3011,430],{},[376,3013,3014],{},[32,3015,385],{},[376,3017,388],{},[376,3019,439],{},[355,3021,3022,3026,3030,3034],{},[376,3023,3024],{},[32,3025,446],{},[376,3027,3028],{},[32,3029,451],{},[376,3031,3032],{},[32,3033,456],{},[376,3035,459],{},[355,3037,3038,3042,3046,3050],{},[376,3039,3040],{},[32,3041,466],{},[376,3043,3044],{},[32,3045,471],{},[376,3047,3048],{},[32,3049,476],{},[376,3051,479],{},[355,3053,3054,3058,3062,3066],{},[376,3055,3056],{},[32,3057,486],{},[376,3059,3060],{},[32,3061,471],{},[376,3063,3064],{},[32,3065,495],{},[376,3067,498],{},[355,3069,3070,3074,3078,3082],{},[376,3071,3072],{},[32,3073,505],{},[376,3075,3076],{},[32,3077,471],{},[376,3079,3080],{},[32,3081,514],{},[376,3083,517],{},[355,3085,3086,3090,3094,3098],{},[376,3087,3088],{},[32,3089,524],{},[376,3091,3092],{},[32,3093,471],{},[376,3095,3096],{},[32,3097,495],{},[376,3099,535],{},[355,3101,3102,3106,3110,3114],{},[376,3103,3104],{},[32,3105,542],{},[376,3107,3108],{},[32,3109,547],{},[376,3111,3112],{},[32,3113,552],{},[376,3115,555],{},[19,3117,559],{"id":558},[15,3119,562],{},[37,3121,3122],{"className":192,"code":565,"language":194,"meta":42,"style":42},[32,3123,3124],{"__ignoreMap":42},[46,3125,3126],{"class":48,"line":49},[46,3127,565],{},[15,3129,574],{},[19,3131,578],{"id":577},[15,3133,581,3134,586,3136,590],{},[583,3135,585],{},[583,3137,589],{},[24,3139,594],{"id":593},[37,3141,3142],{"className":192,"code":597,"language":194,"meta":42,"style":42},[32,3143,3144,3148,3152,3156],{"__ignoreMap":42},[46,3145,3146],{"class":48,"line":49},[46,3147,604],{},[46,3149,3150],{"class":48,"line":55},[46,3151,609],{},[46,3153,3154],{"class":48,"line":61},[46,3155,614],{},[46,3157,3158],{"class":48,"line":67},[46,3159,619],{},[24,3161,623],{"id":622},[37,3163,3164],{"className":192,"code":626,"language":194,"meta":42,"style":42},[32,3165,3166,3170,3174,3178],{"__ignoreMap":42},[46,3167,3168],{"class":48,"line":49},[46,3169,633],{},[46,3171,3172],{"class":48,"line":55},[46,3173,638],{},[46,3175,3176],{"class":48,"line":61},[46,3177,643],{},[46,3179,3180],{"class":48,"line":67},[46,3181,619],{},[19,3183,651],{"id":650},[37,3185,3186],{"className":192,"code":654,"language":194,"meta":42,"style":42},[32,3187,3188,3192,3196,3200,3204,3208,3212,3216],{"__ignoreMap":42},[46,3189,3190],{"class":48,"line":49},[46,3191,661],{},[46,3193,3194],{"class":48,"line":55},[46,3195,666],{},[46,3197,3198],{"class":48,"line":61},[46,3199,95],{"emptyLinePlaceholder":94},[46,3201,3202],{"class":48,"line":67},[46,3203,675],{},[46,3205,3206],{"class":48,"line":73},[46,3207,680],{},[46,3209,3210],{"class":48,"line":79},[46,3211,95],{"emptyLinePlaceholder":94},[46,3213,3214],{"class":48,"line":85},[46,3215,689],{},[46,3217,3218],{"class":48,"line":91},[46,3219,694],{},[19,3221,698],{"id":697},[15,3223,701,3224,705],{},[32,3225,704],{},[37,3227,3228],{"className":192,"code":708,"language":194,"meta":42,"style":42},[32,3229,3230,3234,3238,3242,3246,3250,3254,3258,3262],{"__ignoreMap":42},[46,3231,3232],{"class":48,"line":49},[46,3233,715],{},[46,3235,3236],{"class":48,"line":55},[46,3237,215],{},[46,3239,3240],{"class":48,"line":61},[46,3241,724],{},[46,3243,3244],{"class":48,"line":67},[46,3245,297],{},[46,3247,3248],{"class":48,"line":73},[46,3249,733],{},[46,3251,3252],{"class":48,"line":79},[46,3253,215],{},[46,3255,3256],{"class":48,"line":85},[46,3257,742],{},[46,3259,3260],{"class":48,"line":91},[46,3261,747],{},[46,3263,3264],{"class":48,"line":98},[46,3265,297],{},[15,3267,754,3268,586,3270,761],{},[32,3269,757],{},[32,3271,760],{},[19,3273,765],{"id":764},[15,3275,768],{},[37,3277,3278],{"className":192,"code":771,"language":194,"meta":42,"style":42},[32,3279,3280],{"__ignoreMap":42},[46,3281,3282],{"class":48,"line":49},[46,3283,771],{},[15,3285,780],{},[37,3287,3288],{"className":192,"code":783,"language":194,"meta":42,"style":42},[32,3289,3290],{"__ignoreMap":42},[46,3291,3292],{"class":48,"line":49},[46,3293,783],{},[19,3295,793],{"id":792},[15,3297,796],{},[171,3299,3300,3302,3304],{},[174,3301,801],{},[174,3303,804],{},[174,3305,807],{},[19,3307,811],{"id":810},[15,3309,814,3310,818],{},[32,3311,817],{},[37,3313,3314],{"className":192,"code":821,"language":194,"meta":42,"style":42},[32,3315,3316],{"__ignoreMap":42},[46,3317,3318],{"class":48,"line":49},[46,3319,821],{},[15,3321,830,3322,834],{},[32,3323,833],{},[19,3325,838],{"id":837},[15,3327,3328,844],{},[32,3329,843],{},[19,3331,848],{"id":847},[15,3333,851,3334,855],{},[32,3335,854],{},[37,3337,3338],{"className":192,"code":858,"language":194,"meta":42,"style":42},[32,3339,3340,3344,3348,3352,3356,3360,3364,3368],{"__ignoreMap":42},[46,3341,3342],{"class":48,"line":49},[46,3343,215],{},[46,3345,3346],{"class":48,"line":55},[46,3347,869],{},[46,3349,3350],{"class":48,"line":61},[46,3351,257],{},[46,3353,3354],{"class":48,"line":67},[46,3355,263],{},[46,3357,3358],{"class":48,"line":73},[46,3359,95],{"emptyLinePlaceholder":94},[46,3361,3362],{"class":48,"line":79},[46,3363,886],{},[46,3365,3366],{"class":48,"line":85},[46,3367,95],{"emptyLinePlaceholder":94},[46,3369,3370],{"class":48,"line":91},[46,3371,895],{},[19,3373,899],{"id":898},[171,3375,3376,3380,3384],{},[174,3377,3378,909],{},[905,3379,908],{"href":907},[174,3381,3382,916],{},[905,3383,915],{"href":914},[174,3385,3386,923],{},[905,3387,922],{"href":921},[925,3389,927],{},{"title":42,"searchDepth":55,"depth":55,"links":3391},[3392,3397,3400,3401,3405,3406,3407,3408,3409,3410,3411,3412],{"id":21,"depth":55,"text":22,"children":3393},[3394,3395,3396],{"id":26,"depth":61,"text":27},{"id":104,"depth":61,"text":105},{"id":168,"depth":61,"text":169},{"id":188,"depth":55,"text":189,"children":3398},[3399],{"id":346,"depth":61,"text":347},{"id":558,"depth":55,"text":559},{"id":577,"depth":55,"text":578,"children":3402},[3403,3404],{"id":593,"depth":61,"text":594},{"id":622,"depth":61,"text":623},{"id":650,"depth":55,"text":651},{"id":697,"depth":55,"text":698},{"id":764,"depth":55,"text":765},{"id":792,"depth":55,"text":793},{"id":810,"depth":55,"text":811},{"id":837,"depth":55,"text":838},{"id":847,"depth":55,"text":848},{"id":898,"depth":55,"text":899},{},{"title":5,"description":951},{"id":3416,"title":3417,"body":3418,"description":4379,"extension":952,"meta":4380,"navigation":94,"order":254,"path":1254,"published":94,"section":955,"seo":4381,"stem":4382,"__hash__":4383},"beaconDocs\u002Fbeacon\u002Fdocs\u002Fsdk\u002Fjavascript.md","JavaScript \u002F TypeScript SDK",{"type":7,"value":3419,"toc":4355},[3420,3424,3427,3429,3432,3448,3451,3505,3507,3515,3517,3615,3617,3830,3832,3835,3852,3857,3859,3865,3867,3916,3918,3934,3938,3948,3992,3999,4003,4008,4067,4075,4077,4090,4093,4115,4117,4128,4131,4147,4151,4154,4191,4194,4198,4201,4214,4217,4221,4224,4285,4289,4292,4305,4307,4310,4323,4326,4330,4336,4338,4352],[10,3421,3423],{"id":3422},"beacon-javascript-typescript-sdk","Beacon JavaScript \u002F TypeScript SDK",[15,3425,3426],{},"The Beacon JavaScript \u002F TypeScript SDK provides lightweight, browser-native integration for web applications. Under 5 KB gzipped, it includes automatic page view tracking, session management, and error tracking with full TypeScript definitions.",[19,3428,22],{"id":21},[15,3430,3431],{},"Install via npm:",[37,3433,3435],{"className":108,"code":3434,"language":110,"meta":42,"style":42},"npm install @softagility\u002Fbeacon-js\n",[32,3436,3437],{"__ignoreMap":42},[46,3438,3439,3442,3445],{"class":48,"line":49},[46,3440,3441],{"class":117},"npm",[46,3443,3444],{"class":121}," install",[46,3446,3447],{"class":121}," @softagility\u002Fbeacon-js\n",[15,3449,3450],{},"The package ships ESM, CommonJS, and UMD builds:",[349,3452,3453,3463],{},[352,3454,3455],{},[355,3456,3457,3460],{},[358,3458,3459],{},"Format",[358,3461,3462],{},"Entry",[371,3464,3465,3475,3485,3495],{},[355,3466,3467,3470],{},[376,3468,3469],{},"ESM",[376,3471,3472],{},[32,3473,3474],{},"dist\u002Fbeacon.esm.js",[355,3476,3477,3480],{},[376,3478,3479],{},"CommonJS",[376,3481,3482],{},[32,3483,3484],{},"dist\u002Fbeacon.cjs.js",[355,3486,3487,3490],{},[376,3488,3489],{},"UMD (browser)",[376,3491,3492],{},[32,3493,3494],{},"dist\u002Fbeacon.umd.js",[355,3496,3497,3500],{},[376,3498,3499],{},"Types",[376,3501,3502],{},[32,3503,3504],{},"dist\u002Fbeacon.d.ts",[24,3506,169],{"id":168},[171,3508,3509,3512],{},[174,3510,3511],{},"Any modern browser (Chrome, Firefox, Safari, Edge)",[174,3513,3514],{},"No dependencies",[19,3516,189],{"id":188},[37,3518,3522],{"className":3519,"code":3520,"language":3521,"meta":42,"style":42},"language-typescript shiki shiki-themes github-dark","import { Beacon } from '@softagility\u002Fbeacon-js'\n\nconst beacon = Beacon.init({\n  apiKey: 'your-api-key',\n  sourceApp: 'MyWebApp',\n  sourceVersion: '1.2.0',\n})\n\nbeacon.identify('user-123')\n","typescript",[32,3523,3524,3538,3542,3561,3571,3581,3591,3596,3600],{"__ignoreMap":42},[46,3525,3526,3529,3532,3535],{"class":48,"line":49},[46,3527,3528],{"class":1096},"import",[46,3530,3531],{"class":1083}," { Beacon } ",[46,3533,3534],{"class":1096},"from",[46,3536,3537],{"class":121}," '@softagility\u002Fbeacon-js'\n",[46,3539,3540],{"class":48,"line":55},[46,3541,95],{"emptyLinePlaceholder":94},[46,3543,3544,3547,3550,3552,3555,3558],{"class":48,"line":61},[46,3545,3546],{"class":1096},"const",[46,3548,3549],{"class":130}," beacon",[46,3551,1174],{"class":1096},[46,3553,3554],{"class":1083}," Beacon.",[46,3556,3557],{"class":117},"init",[46,3559,3560],{"class":1083},"({\n",[46,3562,3563,3566,3569],{"class":48,"line":67},[46,3564,3565],{"class":1083},"  apiKey: ",[46,3567,3568],{"class":121},"'your-api-key'",[46,3570,1345],{"class":1083},[46,3572,3573,3576,3579],{"class":48,"line":73},[46,3574,3575],{"class":1083},"  sourceApp: ",[46,3577,3578],{"class":121},"'MyWebApp'",[46,3580,1345],{"class":1083},[46,3582,3583,3586,3589],{"class":48,"line":79},[46,3584,3585],{"class":1083},"  sourceVersion: ",[46,3587,3588],{"class":121},"'1.2.0'",[46,3590,1345],{"class":1083},[46,3592,3593],{"class":48,"line":85},[46,3594,3595],{"class":1083},"})\n",[46,3597,3598],{"class":48,"line":91},[46,3599,95],{"emptyLinePlaceholder":94},[46,3601,3602,3605,3608,3610,3613],{"class":48,"line":98},[46,3603,3604],{"class":1083},"beacon.",[46,3606,3607],{"class":117},"identify",[46,3609,1090],{"class":1083},[46,3611,3612],{"class":121},"'user-123'",[46,3614,82],{"class":1083},[24,3616,347],{"id":346},[349,3618,3619,3631],{},[352,3620,3621],{},[355,3622,3623,3625,3627,3629],{},[358,3624,360],{},[358,3626,363],{},[358,3628,366],{},[358,3630,369],{},[371,3632,3633,3648,3663,3678,3697,3717,3736,3755,3774,3793,3811],{},[355,3634,3635,3640,3644,3646],{},[376,3636,3637],{},[32,3638,3639],{},"apiKey",[376,3641,3642],{},[32,3643,1741],{},[376,3645,388],{},[376,3647,391],{},[355,3649,3650,3655,3659,3661],{},[376,3651,3652],{},[32,3653,3654],{},"sourceApp",[376,3656,3657],{},[32,3658,1741],{},[376,3660,388],{},[376,3662,1776],{},[355,3664,3665,3670,3674,3676],{},[376,3666,3667],{},[32,3668,3669],{},"sourceVersion",[376,3671,3672],{},[32,3673,1741],{},[376,3675,388],{},[376,3677,1792],{},[355,3679,3680,3685,3689,3694],{},[376,3681,3682],{},[32,3683,3684],{},"endpoint",[376,3686,3687],{},[32,3688,1741],{},[376,3690,3691],{},[32,3692,3693],{},"https:\u002F\u002Fbeacon.softagility.com",[376,3695,3696],{},"API base URL override",[355,3698,3699,3704,3709,3714],{},[376,3700,3701],{},[32,3702,3703],{},"sessionTimeoutMinutes",[376,3705,3706],{},[32,3707,3708],{},"number",[376,3710,3711],{},[32,3712,3713],{},"30",[376,3715,3716],{},"Inactivity timeout before session rotates (1-1440)",[355,3718,3719,3724,3729,3733],{},[376,3720,3721],{},[32,3722,3723],{},"autoPageViews",[376,3725,3726],{},[32,3727,3728],{},"boolean",[376,3730,3731],{},[32,3732,456],{},[376,3734,3735],{},"Auto-track page views on route changes",[355,3737,3738,3743,3747,3752],{},[376,3739,3740],{},[32,3741,3742],{},"flushIntervalMs",[376,3744,3745],{},[32,3746,3708],{},[376,3748,3749],{},[32,3750,3751],{},"10000",[376,3753,3754],{},"Flush interval in milliseconds (1000-300000)",[355,3756,3757,3762,3766,3771],{},[376,3758,3759],{},[32,3760,3761],{},"maxBatchSize",[376,3763,3764],{},[32,3765,3708],{},[376,3767,3768],{},[32,3769,3770],{},"50",[376,3772,3773],{},"Events per flush batch (1-1000)",[355,3775,3776,3781,3785,3790],{},[376,3777,3778],{},[32,3779,3780],{},"maxQueueSize",[376,3782,3783],{},[32,3784,3708],{},[376,3786,3787],{},[32,3788,3789],{},"5000",[376,3791,3792],{},"Maximum in-memory queue depth (100-10000)",[355,3794,3795,3800,3804,3808],{},[376,3796,3797],{},[32,3798,3799],{},"maxBreadcrumbs",[376,3801,3802],{},[32,3803,3708],{},[376,3805,3806],{},[32,3807,495],{},[376,3809,3810],{},"Breadcrumb ring buffer size (0-200, 0 disables)",[355,3812,3813,3818,3822,3827],{},[376,3814,3815],{},[32,3816,3817],{},"debug",[376,3819,3820],{},[32,3821,3728],{},[376,3823,3824],{},[32,3825,3826],{},"false",[376,3828,3829],{},"Log SDK actions to console",[19,3831,559],{"id":558},[15,3833,3834],{},"Identify the current user to associate events with an actor:",[37,3836,3838],{"className":3519,"code":3837,"language":3521,"meta":42,"style":42},"beacon.identify('user-123')\n",[32,3839,3840],{"__ignoreMap":42},[46,3841,3842,3844,3846,3848,3850],{"class":48,"line":49},[46,3843,3604],{"class":1083},[46,3845,3607],{"class":117},[46,3847,1090],{"class":1083},[46,3849,3612],{"class":121},[46,3851,82],{"class":1083},[15,3853,830,3854,3856],{},[32,3855,3607],{}," before or after tracking events. Once set, all subsequent calls use this actor. If not called, the SDK generates an anonymous device ID that persists in localStorage.",[19,3858,578],{"id":577},[15,3860,581,3861,586,3863,590],{},[583,3862,585],{},[583,3864,589],{},[24,3866,594],{"id":593},[37,3868,3870],{"className":3519,"code":3869,"language":3521,"meta":42,"style":42},"beacon.track('ui', 'button_clicked', {\n  button_name: 'export',\n  screen: 'dashboard',\n})\n",[32,3871,3872,3892,3902,3912],{"__ignoreMap":42},[46,3873,3874,3876,3879,3881,3884,3886,3889],{"class":48,"line":49},[46,3875,3604],{"class":1083},[46,3877,3878],{"class":117},"track",[46,3880,1090],{"class":1083},[46,3882,3883],{"class":121},"'ui'",[46,3885,1320],{"class":1083},[46,3887,3888],{"class":121},"'button_clicked'",[46,3890,3891],{"class":1083},", {\n",[46,3893,3894,3897,3900],{"class":48,"line":55},[46,3895,3896],{"class":1083},"  button_name: ",[46,3898,3899],{"class":121},"'export'",[46,3901,1345],{"class":1083},[46,3903,3904,3907,3910],{"class":48,"line":61},[46,3905,3906],{"class":1083},"  screen: ",[46,3908,3909],{"class":121},"'dashboard'",[46,3911,1345],{"class":1083},[46,3913,3914],{"class":48,"line":67},[46,3915,3595],{"class":1083},[24,3917,2073],{"id":2072},[171,3919,3920,3922,3924,3927],{},[174,3921,2078],{},[174,3923,2081],{},[174,3925,3926],{},"Properties: max 20 per event, keys max 64 chars, string values max 256 chars",[174,3928,3929,3930,3933],{},"Categories starting with ",[32,3931,3932],{},"_"," are reserved and will be ignored",[19,3935,3937],{"id":3936},"page-view-tracking","Page View Tracking",[15,3939,3940,3941,586,3944,3947],{},"Page views are tracked automatically by default when the URL changes (via ",[32,3942,3943],{},"pushState",[32,3945,3946],{},"popstate","). You can also track manually:",[37,3949,3951],{"className":3519,"code":3950,"language":3521,"meta":42,"style":42},"beacon.pageView()\n\n\u002F\u002F Or with a custom URL and properties\nbeacon.pageView('\u002Fcustom-path', { section: 'reports' })\n",[32,3952,3953,3963,3967,3972],{"__ignoreMap":42},[46,3954,3955,3957,3960],{"class":48,"line":49},[46,3956,3604],{"class":1083},[46,3958,3959],{"class":117},"pageView",[46,3961,3962],{"class":1083},"()\n",[46,3964,3965],{"class":48,"line":55},[46,3966,95],{"emptyLinePlaceholder":94},[46,3968,3969],{"class":48,"line":61},[46,3970,3971],{"class":2099},"\u002F\u002F Or with a custom URL and properties\n",[46,3973,3974,3976,3978,3980,3983,3986,3989],{"class":48,"line":67},[46,3975,3604],{"class":1083},[46,3977,3959],{"class":117},[46,3979,1090],{"class":1083},[46,3981,3982],{"class":121},"'\u002Fcustom-path'",[46,3984,3985],{"class":1083},", { section: ",[46,3987,3988],{"class":121},"'reports'",[46,3990,3991],{"class":1083}," })\n",[15,3993,3994,3995,3998],{},"Disable auto-tracking with ",[32,3996,3997],{},"autoPageViews: false"," in the config.",[19,4000,4002],{"id":4001},"error-tracking","Error Tracking",[15,4004,4005,4006,705],{},"Track JavaScript errors with severity levels. Breadcrumbs from recent ",[32,4007,704],{},[37,4009,4011],{"className":3519,"code":4010,"language":3521,"meta":42,"style":42},"try {\n  processOrder(order)\n} catch (err) {\n  beacon.trackError(err, 'non_fatal')\n  throw err\n}\n",[32,4012,4013,4021,4029,4039,4055,4063],{"__ignoreMap":42},[46,4014,4015,4018],{"class":48,"line":49},[46,4016,4017],{"class":1096},"try",[46,4019,4020],{"class":1083}," {\n",[46,4022,4023,4026],{"class":48,"line":55},[46,4024,4025],{"class":117},"  processOrder",[46,4027,4028],{"class":1083},"(order)\n",[46,4030,4031,4034,4036],{"class":48,"line":61},[46,4032,4033],{"class":1083},"} ",[46,4035,2179],{"class":1096},[46,4037,4038],{"class":1083}," (err) {\n",[46,4040,4041,4044,4047,4050,4053],{"class":48,"line":67},[46,4042,4043],{"class":1083},"  beacon.",[46,4045,4046],{"class":117},"trackError",[46,4048,4049],{"class":1083},"(err, ",[46,4051,4052],{"class":121},"'non_fatal'",[46,4054,82],{"class":1083},[46,4056,4057,4060],{"class":48,"line":73},[46,4058,4059],{"class":1096},"  throw",[46,4061,4062],{"class":1083}," err\n",[46,4064,4065],{"class":48,"line":79},[46,4066,297],{"class":1083},[15,4068,754,4069,586,4072,4074],{},[32,4070,4071],{},"'fatal'",[32,4073,4052],{}," (default).",[19,4076,651],{"id":650},[15,4078,4079,4080,4082,4083,586,4086,4089],{},"Sessions are managed automatically based on user activity. A new session starts on the first event and rotates after ",[32,4081,3703],{}," of inactivity. The SDK handles ",[32,4084,4085],{},"visibilitychange",[32,4087,4088],{},"beforeunload"," events to end sessions when the user leaves.",[15,4091,4092],{},"Get the current session ID:",[37,4094,4096],{"className":3519,"code":4095,"language":3521,"meta":42,"style":42},"const sessionId = beacon.getSessionId()\n",[32,4097,4098],{"__ignoreMap":42},[46,4099,4100,4102,4105,4107,4110,4113],{"class":48,"line":49},[46,4101,3546],{"class":1096},[46,4103,4104],{"class":130}," sessionId",[46,4106,1174],{"class":1096},[46,4108,4109],{"class":1083}," beacon.",[46,4111,4112],{"class":117},"getSessionId",[46,4114,3962],{"class":1083},[19,4116,765],{"id":764},[15,4118,2246,4119,4121,4122,1434,4124,4127],{},[32,4120,3742],{},") or when the batch size is reached. On page unload, the SDK uses ",[32,4123,1433],{},[32,4125,4126],{},"keepalive: true"," to deliver remaining events.",[15,4129,4130],{},"To flush manually:",[37,4132,4134],{"className":3519,"code":4133,"language":3521,"meta":42,"style":42},"await beacon.flush()\n",[32,4135,4136],{"__ignoreMap":42},[46,4137,4138,4140,4142,4145],{"class":48,"line":49},[46,4139,2262],{"class":1096},[46,4141,4109],{"class":1083},[46,4143,4144],{"class":117},"flush",[46,4146,3962],{"class":1083},[19,4148,4150],{"id":4149},"privacy-controls","Privacy Controls",[15,4152,4153],{},"The SDK supports opt-out and opt-in for user consent:",[37,4155,4157],{"className":3519,"code":4156,"language":3521,"meta":42,"style":42},"\u002F\u002F Opt out — stops tracking, clears queue\nbeacon.optOut()\n\n\u002F\u002F Opt back in — resumes tracking\nbeacon.optIn()\n",[32,4158,4159,4164,4173,4177,4182],{"__ignoreMap":42},[46,4160,4161],{"class":48,"line":49},[46,4162,4163],{"class":2099},"\u002F\u002F Opt out — stops tracking, clears queue\n",[46,4165,4166,4168,4171],{"class":48,"line":55},[46,4167,3604],{"class":1083},[46,4169,4170],{"class":117},"optOut",[46,4172,3962],{"class":1083},[46,4174,4175],{"class":48,"line":61},[46,4176,95],{"emptyLinePlaceholder":94},[46,4178,4179],{"class":48,"line":67},[46,4180,4181],{"class":2099},"\u002F\u002F Opt back in — resumes tracking\n",[46,4183,4184,4186,4189],{"class":48,"line":73},[46,4185,3604],{"class":1083},[46,4187,4188],{"class":117},"optIn",[46,4190,3962],{"class":1083},[15,4192,4193],{},"Opt-out state persists in localStorage across sessions.",[19,4195,4197],{"id":4196},"reset","Reset",[15,4199,4200],{},"Clear all state (session, queue, breadcrumbs, actor ID) and generate a new anonymous ID:",[37,4202,4204],{"className":3519,"code":4203,"language":3521,"meta":42,"style":42},"beacon.reset()\n",[32,4205,4206],{"__ignoreMap":42},[46,4207,4208,4210,4212],{"class":48,"line":49},[46,4209,3604],{"class":1083},[46,4211,4196],{"class":117},[46,4213,3962],{"class":1083},[15,4215,4216],{},"Use this on logout to separate user sessions.",[19,4218,4220],{"id":4219},"event-definitions","Event Definitions",[15,4222,4223],{},"Register known events for import into the Beacon portal's allowlist:",[37,4225,4227],{"className":3519,"code":4226,"language":3521,"meta":42,"style":42},"beacon.events.define('reports', 'report_exported')\nbeacon.events.define('ui', 'button_clicked')\n\nconst manifest = beacon.events.exportManifest()\n",[32,4228,4229,4248,4264,4268],{"__ignoreMap":42},[46,4230,4231,4234,4237,4239,4241,4243,4246],{"class":48,"line":49},[46,4232,4233],{"class":1083},"beacon.events.",[46,4235,4236],{"class":117},"define",[46,4238,1090],{"class":1083},[46,4240,3988],{"class":121},[46,4242,1320],{"class":1083},[46,4244,4245],{"class":121},"'report_exported'",[46,4247,82],{"class":1083},[46,4249,4250,4252,4254,4256,4258,4260,4262],{"class":48,"line":55},[46,4251,4233],{"class":1083},[46,4253,4236],{"class":117},[46,4255,1090],{"class":1083},[46,4257,3883],{"class":121},[46,4259,1320],{"class":1083},[46,4261,3888],{"class":121},[46,4263,82],{"class":1083},[46,4265,4266],{"class":48,"line":61},[46,4267,95],{"emptyLinePlaceholder":94},[46,4269,4270,4272,4275,4277,4280,4283],{"class":48,"line":67},[46,4271,3546],{"class":1096},[46,4273,4274],{"class":130}," manifest",[46,4276,1174],{"class":1096},[46,4278,4279],{"class":1083}," beacon.events.",[46,4281,4282],{"class":117},"exportManifest",[46,4284,3962],{"class":1083},[19,4286,4288],{"id":4287},"destroy","Destroy",[15,4290,4291],{},"Tear down the SDK instance, flush pending events, and remove event listeners:",[37,4293,4295],{"className":3519,"code":4294,"language":3521,"meta":42,"style":42},"beacon.destroy()\n",[32,4296,4297],{"__ignoreMap":42},[46,4298,4299,4301,4303],{"class":48,"line":49},[46,4300,3604],{"class":1083},[46,4302,4287],{"class":117},[46,4304,3962],{"class":1083},[19,4306,1370],{"id":1369},[15,4308,4309],{},"The SDK automatically collects browser environment data and sends it as a header with each request:",[171,4311,4312,4314,4316,4318,4321],{},[174,4313,1405],{},[174,4315,1408],{},[174,4317,1411],{},[174,4319,4320],{},"Device type (desktop\u002Fmobile\u002Ftablet)",[174,4322,1417],{},[15,4324,4325],{},"No PII is collected.",[19,4327,4329],{"id":4328},"singleton-pattern","Singleton Pattern",[15,4331,4332,4335],{},[32,4333,4334],{},"Beacon.init()"," returns a singleton. Calling it again returns the existing instance. If the SDK is loaded in a non-browser environment (SSR), it returns a safe no-op instance.",[19,4337,899],{"id":898},[171,4339,4340,4344,4348],{},[174,4341,4342,909],{},[905,4343,908],{"href":907},[174,4345,4346,916],{},[905,4347,915],{"href":914},[174,4349,4350,923],{},[905,4351,922],{"href":921},[925,4353,4354],{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":42,"searchDepth":55,"depth":55,"links":4356},[4357,4360,4363,4364,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378],{"id":21,"depth":55,"text":22,"children":4358},[4359],{"id":168,"depth":61,"text":169},{"id":188,"depth":55,"text":189,"children":4361},[4362],{"id":346,"depth":61,"text":347},{"id":558,"depth":55,"text":559},{"id":577,"depth":55,"text":578,"children":4365},[4366,4367],{"id":593,"depth":61,"text":594},{"id":2072,"depth":61,"text":2073},{"id":3936,"depth":55,"text":3937},{"id":4001,"depth":55,"text":4002},{"id":650,"depth":55,"text":651},{"id":764,"depth":55,"text":765},{"id":4149,"depth":55,"text":4150},{"id":4196,"depth":55,"text":4197},{"id":4219,"depth":55,"text":4220},{"id":4287,"depth":55,"text":4288},{"id":1369,"depth":55,"text":1370},{"id":4328,"depth":55,"text":4329},{"id":898,"depth":55,"text":899},"Integrate Beacon product analytics into browser-based web applications.",{},{"title":3417,"description":4379},"beacon\u002Fdocs\u002Fsdk\u002Fjavascript","SpRUdifHjtIaHwrSbsvwQtv9x0tFfeYjW4O5koDCQPk",{"id":4385,"title":915,"body":4386,"description":4895,"extension":952,"meta":4896,"navigation":94,"order":2598,"path":914,"published":94,"section":4897,"seo":4898,"stem":4899,"__hash__":4900},"beaconDocs\u002Fbeacon\u002Fdocs\u002Fapi-reference.md",{"type":7,"value":4387,"toc":4881},[4388,4391,4394,4398,4401,4409,4415,4419,4426,4520,4524,4532,4536,4609,4613,4616,4621,4651,4656,4682,4716,4720,4723,4739,4743,4746,4758,4762,4765,4795,4815,4824,4828,4831,4837,4847,4851,4858,4861,4864,4878],[10,4389,915],{"id":4390},"api-reference",[15,4392,4393],{},"Beacon provides a REST API for direct integration when an SDK is not suitable for your environment. The API is used internally by all Beacon SDKs.",[19,4395,4397],{"id":4396},"interactive-documentation","Interactive Documentation",[15,4399,4400],{},"Full interactive API documentation is available at:",[15,4402,4403],{},[583,4404,4405],{},[905,4406,4408],{"href":4407},"#","Beacon API Reference (Scalar)",[15,4410,4411],{},[4412,4413,4414],"em",{},"The API documentation URL will be available when Beacon launches. The interactive docs let you explore endpoints, view request\u002Fresponse schemas, and test calls directly from your browser.",[19,4416,4418],{"id":4417},"authentication","Authentication",[15,4420,4421,4422,4425],{},"All ingestion API requests require an API key passed as a Bearer token in the ",[32,4423,4424],{},"Authorization"," header:",[37,4427,4429],{"className":108,"code":4428,"language":110,"meta":42,"style":42},"curl -X POST https:\u002F\u002Fapi.beacon.softagility.com\u002Fv1\u002Fevents \\\n  -H \"Authorization: Bearer your-api-key\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '[{\n    \"event_id\": \"01912345-6789-7abc-def0-123456789abc\",\n    \"category\": \"reports\",\n    \"name\": \"report_exported\",\n    \"timestamp\": \"2026-03-20T14:30:00Z\",\n    \"actor_id\": \"user-123\",\n    \"source_app\": \"MyApp\",\n    \"source_version\": \"1.2.0\",\n    \"properties\": { \"format\": \"pdf\", \"row_count\": \"1500\" }\n  }]'\n",[32,4430,4431,4448,4458,4467,4475,4480,4485,4490,4495,4500,4505,4510,4515],{"__ignoreMap":42},[46,4432,4433,4436,4439,4442,4445],{"class":48,"line":49},[46,4434,4435],{"class":117},"curl",[46,4437,4438],{"class":130}," -X",[46,4440,4441],{"class":121}," POST",[46,4443,4444],{"class":121}," https:\u002F\u002Fapi.beacon.softagility.com\u002Fv1\u002Fevents",[46,4446,4447],{"class":130}," \\\n",[46,4449,4450,4453,4456],{"class":48,"line":55},[46,4451,4452],{"class":130},"  -H",[46,4454,4455],{"class":121}," \"Authorization: Bearer your-api-key\"",[46,4457,4447],{"class":130},[46,4459,4460,4462,4465],{"class":48,"line":61},[46,4461,4452],{"class":130},[46,4463,4464],{"class":121}," \"Content-Type: application\u002Fjson\"",[46,4466,4447],{"class":130},[46,4468,4469,4472],{"class":48,"line":67},[46,4470,4471],{"class":130},"  -d",[46,4473,4474],{"class":121}," '[{\n",[46,4476,4477],{"class":48,"line":73},[46,4478,4479],{"class":121},"    \"event_id\": \"01912345-6789-7abc-def0-123456789abc\",\n",[46,4481,4482],{"class":48,"line":79},[46,4483,4484],{"class":121},"    \"category\": \"reports\",\n",[46,4486,4487],{"class":48,"line":85},[46,4488,4489],{"class":121},"    \"name\": \"report_exported\",\n",[46,4491,4492],{"class":48,"line":91},[46,4493,4494],{"class":121},"    \"timestamp\": \"2026-03-20T14:30:00Z\",\n",[46,4496,4497],{"class":48,"line":98},[46,4498,4499],{"class":121},"    \"actor_id\": \"user-123\",\n",[46,4501,4502],{"class":48,"line":243},[46,4503,4504],{"class":121},"    \"source_app\": \"MyApp\",\n",[46,4506,4507],{"class":48,"line":249},[46,4508,4509],{"class":121},"    \"source_version\": \"1.2.0\",\n",[46,4511,4512],{"class":48,"line":254},[46,4513,4514],{"class":121},"    \"properties\": { \"format\": \"pdf\", \"row_count\": \"1500\" }\n",[46,4516,4517],{"class":48,"line":260},[46,4518,4519],{"class":121},"  }]'\n",[19,4521,4523],{"id":4522},"base-url","Base URL",[37,4525,4530],{"className":4526,"code":4528,"language":4529},[4527],"language-text","https:\u002F\u002Fapi.beacon.softagility.com\u002Fv1\n","text",[32,4531,4528],{"__ignoreMap":42},[19,4533,4535],{"id":4534},"ingestion-endpoints","Ingestion Endpoints",[349,4537,4538,4550],{},[352,4539,4540],{},[355,4541,4542,4545,4548],{},[358,4543,4544],{},"Method",[358,4546,4547],{},"Endpoint",[358,4549,369],{},[371,4551,4552,4567,4581,4595],{},[355,4553,4554,4559,4564],{},[376,4555,4556],{},[32,4557,4558],{},"POST",[376,4560,4561],{},[32,4562,4563],{},"\u002Fv1\u002Fevents",[376,4565,4566],{},"Track one or more events (batch, up to 1000)",[355,4568,4569,4573,4578],{},[376,4570,4571],{},[32,4572,4558],{},[376,4574,4575],{},[32,4576,4577],{},"\u002Fv1\u002Fevents\u002Fsessions",[376,4579,4580],{},"Start a new session",[355,4582,4583,4587,4592],{},[376,4584,4585],{},[32,4586,4558],{},[376,4588,4589],{},[32,4590,4591],{},"\u002Fv1\u002Fevents\u002Fsessions\u002Fend",[376,4593,4594],{},"End an active session",[355,4596,4597,4601,4606],{},[376,4598,4599],{},[32,4600,4558],{},[376,4602,4603],{},[32,4604,4605],{},"\u002Fv1\u002Fevents\u002Fexceptions",[376,4607,4608],{},"Report an exception with stack trace",[24,4610,4612],{"id":4611},"post-v1events","POST \u002Fv1\u002Fevents",[15,4614,4615],{},"Send a JSON array of event objects. Max payload 1 MB, max 1000 events per batch.",[15,4617,4618],{},[583,4619,4620],{},"Required fields per event:",[171,4622,4623,4629,4634,4639,4645],{},[174,4624,4625,4628],{},[32,4626,4627],{},"event_id"," — UUID (v7 recommended)",[174,4630,4631,4633],{},[32,4632,585],{}," — String, max 128 chars",[174,4635,4636,4638],{},[32,4637,589],{}," — String, max 256 chars",[174,4640,4641,4644],{},[32,4642,4643],{},"timestamp"," — ISO 8601 datetime",[174,4646,4647,4650],{},[32,4648,4649],{},"actor_id"," — String, max 512 chars",[15,4652,4653],{},[583,4654,4655],{},"Optional fields:",[171,4657,4658,4664,4670,4676],{},[174,4659,4660,4663],{},[32,4661,4662],{},"source_app"," — Application name",[174,4665,4666,4669],{},[32,4667,4668],{},"source_version"," — Application version",[174,4671,4672,4675],{},[32,4673,4674],{},"properties"," — Object with custom properties",[174,4677,4678,4681],{},[32,4679,4680],{},"session_id"," — UUID linking event to a session",[15,4683,4684,4687,4688,4691,4692,4695,4696,4699,4700,4703,4704,4707,4708,4711,4712,4715],{},[583,4685,4686],{},"Response:"," ",[32,4689,4690],{},"200"," (all accepted), ",[32,4693,4694],{},"207"," (partial success), ",[32,4697,4698],{},"400"," (validation error), ",[32,4701,4702],{},"401"," (invalid API key), ",[32,4705,4706],{},"402"," (plan event limit reached), ",[32,4709,4710],{},"413"," (payload too large), ",[32,4713,4714],{},"429"," (rate limited)",[24,4717,4719],{"id":4718},"post-v1eventssessions","POST \u002Fv1\u002Fevents\u002Fsessions",[15,4721,4722],{},"Start a new session.",[15,4724,4725,4687,4728,1320,4730,1320,4732,1320,4734,1320,4736],{},[583,4726,4727],{},"Required fields:",[32,4729,4680],{},[32,4731,4649],{},[32,4733,4662],{},[32,4735,4668],{},[32,4737,4738],{},"started_at",[24,4740,4742],{"id":4741},"post-v1eventssessionsend","POST \u002Fv1\u002Fevents\u002Fsessions\u002Fend",[15,4744,4745],{},"End an active session.",[15,4747,4748,4687,4750,1320,4752,1320,4755],{},[583,4749,4727],{},[32,4751,4680],{},[32,4753,4754],{},"ended_at",[32,4756,4757],{},"end_reason",[24,4759,4761],{"id":4760},"post-v1eventsexceptions","POST \u002Fv1\u002Fevents\u002Fexceptions",[15,4763,4764],{},"Report an exception.",[15,4766,4767,4687,4769,1320,4772,1320,4775,2182,4778,4781,4782,4785,4786,1320,4789,1320,4791,1320,4793],{},[583,4768,4727],{},[32,4770,4771],{},"exception_id",[32,4773,4774],{},"exception_type",[32,4776,4777],{},"severity",[32,4779,4780],{},"fatal"," or ",[32,4783,4784],{},"non_fatal","), ",[32,4787,4788],{},"occurred_at",[32,4790,4649],{},[32,4792,4662],{},[32,4794,4668],{},[15,4796,4797,4687,4799,4802,4803,4806,4807,4809,4810,1320,4812],{},[583,4798,4655],{},[32,4800,4801],{},"message"," (max 1000 chars), ",[32,4804,4805],{},"stack_trace"," (max 32,768 chars), ",[32,4808,2228],{}," (JSON array), ",[32,4811,4680],{},[32,4813,4814],{},"environment_context",[15,4816,4817,4687,4819,1434,4821],{},[583,4818,4686],{},[32,4820,4690],{},[32,4822,4823],{},"{ \"exception_id\": \"...\", \"status\": \"accepted\", \"fingerprint\": \"...\" }",[19,4825,4827],{"id":4826},"rate-limits","Rate Limits",[15,4829,4830],{},"Rate limits are per-minute and configurable per plan. Rate limit headers are included in every response:",[37,4832,4835],{"className":4833,"code":4834,"language":4529},[4527],"X-RateLimit-Limit: 600\nX-RateLimit-Remaining: 598\nX-RateLimit-Reset: 1711929600\n",[32,4836,4834],{"__ignoreMap":42},[15,4838,4839,4840,4842,4843,4846],{},"When rate limited, the API returns ",[32,4841,4714],{}," with a ",[32,4844,4845],{},"Retry-After"," header.",[19,4848,4850],{"id":4849},"hard-caps","Hard Caps",[15,4852,4853,4854,4857],{},"When a tenant reaches their plan's monthly event limit, the API returns ",[32,4855,4856],{},"402 Payment Required",". Events are rejected until the limit resets or the plan is upgraded. SDKs queue events locally during hard cap periods and retry automatically.",[19,4859,955],{"id":4860},"sdks",[15,4862,4863],{},"For most integrations, we recommend using an SDK instead of the API directly. SDKs handle batching, offline persistence, session management, breadcrumbs, and retry logic automatically.",[171,4865,4866,4870,4874],{},[174,4867,4868],{},[905,4869,1245],{"href":1244},[174,4871,4872],{},[905,4873,5],{"href":954},[174,4875,4876],{},[905,4877,1255],{"href":1254},[925,4879,4880],{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":42,"searchDepth":55,"depth":55,"links":4882},[4883,4884,4885,4886,4892,4893,4894],{"id":4396,"depth":55,"text":4397},{"id":4417,"depth":55,"text":4418},{"id":4522,"depth":55,"text":4523},{"id":4534,"depth":55,"text":4535,"children":4887},[4888,4889,4890,4891],{"id":4611,"depth":61,"text":4612},{"id":4718,"depth":61,"text":4719},{"id":4741,"depth":61,"text":4742},{"id":4760,"depth":61,"text":4761},{"id":4826,"depth":55,"text":4827},{"id":4849,"depth":55,"text":4850},{"id":4860,"depth":55,"text":955},"REST API documentation for direct Beacon integration.",{},"Reference",{"title":915,"description":4895},"beacon\u002Fdocs\u002Fapi-reference","NYoN1PzxAR8BnJQTeO6nJIsraYwF8FaKw4jz9dDUkHs",1775694617513]