CONTEXT

Leroy Merlin 2014 -2019

just a small tagging plan...

  • Hard to test events
  • Analytics code can't be isolated
  • No value for users
  • Introduce bugs
  • Boring !

Rescue tools ?

The idea

Tagging plan with Robolytics

  • 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

Tag automation

The needs

Intercept methods:

  • App lifecycle
  • UI events
  • Custom methods with annotation

 

Extract data:

  • Class and method name
  • Method parameters
  • Field values
  • Custom models

 

Annotation processing / Spoon / AspectJ / Javassist

Proguard / R8
Gradle

Annotation processing

+ Easy to implement

+ Fast

- Don't modify source code

Spoon

+ Rewrite source code

- Require source code

- Not popular

AspectJ

+ Easy to intercept method

+ Bytecode rewrite

- AspectJ Runtime library

- Hard to change properties and class type

Javassist

+ Bitecode rewrite

+ No runtime

+ Easy to setup

Javassist + Android Plugin


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();
        //...

method swizzling

class DataViewController: UIViewController, RobolyticsData{

    func extractData() -> [String : String] {
        return ["data" : dataObject]
    }

Extract Data

Cross-platform

{JSON}
+
Events

= Analytics events

Javascript

Java

Let's transpile !

Kotlin multiplatform

Demo

What next ?

The marketing plan

  • website
  • video
  • conference
  • developers community

TODO

  • update dependencies
  • improve UI
  • build flutter SDK

Robolytics

By Florian Paillard

Robolytics

  • 150