-
Notifications
You must be signed in to change notification settings - Fork 4
Annotations
Welcome to a wiki page. Ganalytics is a library to simplify your work with analytics in app. Here you can find list of all currently supported annotations with their descriptions:
Annotation used when you want to add prefixes for your action in an interface. Scope: method, interface. When this annotation used on method then prefix applies only to it. When @HasPrefix used on interface, then settings of this annotation applies to all methods of interface (expect methods that already have such annotation).
It has two parameters:
-
name- exactly title of prefix for using. For example:interface SomeCategory { @HasPrefix("cat") fun someAction() }
will produce
category = "somecategory"andaction = "catsomeaction" -
splitter- you can specify delimiter between prefix and action. For example:interface SomeCategory { @HasPrefix("cat", splitter = "-") fun someAction() }
will produce
category = "somecategory"andaction = "cat-someaction"
**Note: ** @HasPrefix without name will use name of interface (in lower case) as prefix.
In case when @HasPrefix used on interface for some methods you don't want to use prefix. In this case @NoPrefix can help. For example:
@HasPrefix
interface SomeCategory {
fun action1()
@NoPrefix fun action2()
}will produce two events:
-
category = "somecategory"andaction = "somecategoryaction1" -
category = "somecategory"andaction = "action2"
л