Setup the sdk
Tag everything during build
Publish your app
Work live on the tagging plan in a Console
Send the finished tag to your favorite analytics provider
https://www.youtube.com/watch?v=Vdly6f0E4cc
Intercept methods:
Extract data:
Annotation processing / Spoon / AspectJ / Javassist
Proguard / R8
Gradle
+ Easy to implement
+ Fast
- Don't modify source code
+ Rewrite source code
- Require source code
- Not popular
+ Easy to intercept method
+ Bytecode rewrite
- AspectJ Runtime library
- Hard to change properties and class type
+ Bitecode rewrite
+ No runtime
+ Easy to setup
android.registerTransform(new RobolyticsTransform())
class RobolyticsTransform extends com.android.build.api.transform.Transform {
//...
classPool = new ClassPool(ClassPool.getDefault())
//...
void process(TransformInvocation transformInvocation) {
TransformOutputProvider outputProvider = transformInvocation.getOutputProvider();
// Gather a full list of all inputs.
List<JarInput> jarInputs = Lists.newArrayList();
List<DirectoryInput> directoryInputs = Lists.newArrayList();
//...
class DataViewController: UIViewController, RobolyticsData{
func extractData() -> [String : String] {
return ["data" : dataObject]
}
{JSON}
+
Events
= Analytics events
Javascript
Java
Kotlin multiplatform