{"id":26728912,"url":"https://github.com/ichlubna/simpleqtga4","last_synced_at":"2026-04-27T12:05:16.551Z","repository":{"id":109126895,"uuid":"523818371","full_name":"ichlubna/SimpleQtGA4","owner":"ichlubna","description":"A very simple library that allows to send Google Analytics 4 events","archived":false,"fork":false,"pushed_at":"2022-08-20T05:59:53.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T22:40:24.160Z","etag":null,"topics":["ga4","google-analytics","google-analytics-4","qml","qt"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ichlubna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-11T17:51:35.000Z","updated_at":"2024-03-07T13:35:13.000Z","dependencies_parsed_at":"2023-06-14T21:45:25.560Z","dependency_job_id":null,"html_url":"https://github.com/ichlubna/SimpleQtGA4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ichlubna/SimpleQtGA4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichlubna%2FSimpleQtGA4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichlubna%2FSimpleQtGA4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichlubna%2FSimpleQtGA4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichlubna%2FSimpleQtGA4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ichlubna","download_url":"https://codeload.github.com/ichlubna/SimpleQtGA4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ichlubna%2FSimpleQtGA4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ga4","google-analytics","google-analytics-4","qml","qt"],"created_at":"2025-03-27T22:37:20.285Z","updated_at":"2026-04-27T12:05:16.539Z","avatar_url":"https://github.com/ichlubna.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleQtGA4\nA very simple library that allows to send Google Analytics 4 events.\n\n## Instalation\nAdd *ga4.hpp* to the *HEADERS* in your project ad add Qt *network* module.\n\n## Usage\n\t//C++\n\tGA4 ga4(\"YOUR_ID\");\n\tga4.sendEvent(\"ObiWan\", {\"talk\", \"HelloThere\"});\n\n\t//QML\n\tGA4{\n\t  id: ga4\n          measurementID: \"YOUR_ID\"}\n\tonActiveChanged: { ga4.sendEvent(\"Gandalf\", [\"talk\", \"YouShallNotPass\"]) }\n\nUse the functions like:\n\n\tsendEvent(eventName, eventParameters, turnOnDebugMode)\n\n*QString eventName* - name of the event\n\n*QList\u003cQString\u003e eventParameters* - pairs of parameters [\"firstParamName\", \"firstParamValue\",...]\n\n*bool turnOnDebugMode* - if set to True, the events are shown in a few seconds in the Analytics realtime view and are deleted after 30 minutes\n\n\toverrideDebugMode(debug)\n\n*bool debug* - all events will be in debug mode (ignoring the turnOnDebugMode parameter) if true, call with false to turn it off\n\n## Additional info\nYou can obtain your ID when creating a Google Analytics service and creating a web data stream. Then you can get a Measurement ID there starting with G-..\n\nIf you send the events with custom parameters, you have to define them in Google Analytics settings, otherwise they will not be stored! You can do so by selecting Configure section and Custom definitions. Follow [this](https://youtu.be/Y6YyzX_7OXk) tutorial.\n\nThis library does not do any local storing of the events. All events are sent right when the function is called and in case of no Internet connection they are lost.\n\nIf you encounter a problem with encryption, not being able to send the request, you need to install SSL libraries for your given platform. Another hack is to change *https* to *http* in the *analyticsURL* private member.\n\n## Sources\n[Limits for the event properties (length of the event etc.)](https://support.google.com/analytics/answer/9267744?hl=en\u0026ref_topic=9756175)\n\n[APP + WEB: Google Analytics Measurement Protocol version 2\nDate\n](https://www.thyngster.com/app-web-google-analytics-measurement-protocol-version-2)\n\n[Measurement protocol V2 Google analytics Apps+Web](https://lunaxod.com/measurement-protocol-v2-google-analytics-appsweb/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fichlubna%2Fsimpleqtga4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fichlubna%2Fsimpleqtga4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fichlubna%2Fsimpleqtga4/lists"}