Ampli Wrapper

The Ampli Wrapper exposes a convenient, strongly-typed API that matches the definitions in your Tracking Plan. The tracking library generated by ampli pull is used to track and validate event sent to Amplitude Data. The tracking library is generated on-the-fly to match your tracking plan precisely. This means that instead of tracking events like this:

JSONObject props = new JSONObject();
props.put("name", "Moto 360");

OldLibrary.trackEvent(
  "Product Viewed",
  props
);

You track them like this:

ampli.productViewed(
  name = "Moto 360"
)

No more typos, forgotten properties, and boilerplate code. The Ampli Tracking Library is like auto-complete for your analytics.


Last update: 2022-07-01