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