java.lang.Object | |
↳ | com.google.android.gms.analytics.ecommerce.Promotion |
Class to construct promotion related fields for Google Analytics hits. The fields from this class can be used to represent internal promotions that run within an app, such as banners, banner ads etc. Typical usage:
ScreenViewBuilder builder = new HitBuilders.ScreenViewBuilder(); builder.setPromotionAction(Promotion.ACTION_CLICK) .addPromotion(new Promotion().setId("PROMO-ID1234").setName("Home screen banner.")) tracker.send(builder.build());
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACTION_CLICK | Action to use when the user clicks/taps on a promotion. | |||||||||
String | ACTION_VIEW | Action to use when the user views a promotion. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets the name of the creative associated with the promotion.
| |||||||||||
Sets the id that is used to identify a promotion in GA reports.
| |||||||||||
Sets the name that is used to identify the promotion in GA reports.
| |||||||||||
Sets the position of the promotion.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Action to use when the user clicks/taps on a promotion.
Action to use when the user views a promotion.
Sets the name of the creative associated with the promotion.
value | The promotion creative's name. Example: "Cool pets creative" |
---|
Sets the id that is used to identify a promotion in GA reports.
value | The promotion's id. |
---|
Sets the name that is used to identify the promotion in GA reports.
value | The promotion's name. Example: "Home Banner" |
---|
Sets the position of the promotion.
value | The promotion's position. Example: "top" or "bottom". |
---|