{"id":13537162,"url":"https://github.com/dzmpr/trckr","last_synced_at":"2025-05-14T18:15:38.798Z","repository":{"id":40698443,"uuid":"507389413","full_name":"dzmpr/trckr","owner":"dzmpr","description":"Kotlin Symbol Processor to simplify analytics tracking.","archived":false,"fork":false,"pushed_at":"2025-02-23T17:41:01.000Z","size":1247,"stargazers_count":43,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T04:34:38.465Z","etag":null,"topics":["analytics","android","kotlin","ksp"],"latest_commit_sha":null,"homepage":"https://dzmpr.github.io/trckr/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dzmpr.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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-06-25T18:34:08.000Z","updated_at":"2025-02-24T19:13:45.000Z","dependencies_parsed_at":"2025-04-02T04:30:27.288Z","dependency_job_id":null,"html_url":"https://github.com/dzmpr/trckr","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Ftrckr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Ftrckr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Ftrckr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzmpr%2Ftrckr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzmpr","download_url":"https://codeload.github.com/dzmpr/trckr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198427,"owners_count":22030966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["analytics","android","kotlin","ksp"],"created_at":"2024-08-01T09:00:55.760Z","updated_at":"2025-05-14T18:15:38.768Z","avatar_url":"https://github.com/dzmpr.png","language":"Kotlin","funding_links":[],"categories":["Kotlin","Libraries"],"sub_categories":["Annotation Processor","🔍 Analytics"],"readme":"# trckr\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ru.cookedapp.trckr/trckr-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ru.cookedapp.trckr/trckr-core)\n[![CI](https://github.com/dzmpr/trckr/actions/workflows/tests.yml/badge.svg)](https://github.com/dzmpr/trckr/actions/workflows/tests.yml)\n[![KMM](https://img.shields.io/badge/KMM-supported-orange)](https://kotlinlang.org/docs/multiplatform-mobile-getting-started.html)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nTrckr is **Kotlin Symbol Processor** to help you send analytics to multiple destinations (called adapters).\n\n## Why trckr?\n\nIn a large project you can have multiple analytics targets that should receive events from your app. That creates a lot of boilerplate code to implement tracker that uses all analytics targets.\nTrckr created to eliminate this problem. You need to create target adapters just once, and trckr generate events from interface methods for you.\nTo declare tracker you define interface, annotated with `@Tracker` annotation and event methods with `@Event` annotation:  \n```kotlin \n@Tracker\ninterface ExampleTracker {\n\n    @Event(name = \"Event name\")\n    fun event(\n        @Param(name = \"Parameter name\") data: Int,\n    )\n}\n```  \nAnd create instance of tracker using generated method:  \n```kotlin  \nval tracker = createExampleTracker {  \n    addAdapter(FirebaseAdapter())\n    addAdapter(AmplitudeAdapter())\n    addAdapter(AdjustAdapter())\n}\ntracker.event(data = 42)\n```\nAfter calling event method trckr sends it to all registered adapters.\n```mermaid  \nflowchart TD;\n\tE[ExampleTracker] --event--\u003e A;\n    A[Trckr] --event--\u003e B[Firebase] \u0026 C[Amplitude] \u0026 D[Adjust];\n ```\n\n## Key features\n\n* Adapters skipping\n* Parameter converters support\n* Multimodule project support\n\nMore you can find at [advanced features](https://dzmpr.github.io/trckr/advanced_features/) page.\n\n## Gradle setup\n\n1. Add KSP plugin to your module's `build.gradle.kts`:\n```kotlin\nplugins {\n    id(\"com.google.devtools.ksp\") version \"2.1.0-1.0.30\"\n}\n```\n2. Add `Maven Central` to the repositories blocks in your project's `build.gradle.kts`:\n```kotlin\nrepositories {\n    mavenCentral()\n}\n```\n3. Add `trckr` dependencies:\n```kotlin\ndependencies {\n    implementation(\"ru.cookedapp.trckr:trckr-core:${latestVersion}\")\n    ksp(\"ru.cookedapp.trckr:trckr-processor:${latestVersion}\")\n}\n```\n4. Add KSP source path:\n\nTo access generated code from KSP, you need to set up the source path into your module's `build.gradle.kts` file:\n```kotlin\nkotlin {\n    // ...\n    sourceSets.configureEach {\n        kotlin.srcDir(layout.buildDirectory.dir(\"/generated/ksp/$name/kotlin/\"))\n    }\n}\n```\n\n## License\n\n```text\nCopyright 2022 Dzmitry Pryskoka\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzmpr%2Ftrckr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzmpr%2Ftrckr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzmpr%2Ftrckr/lists"}