public class

ViewableImpression

extends Object
java.lang.Object
   ↳ com.usebutton.sdk.personalization.ViewableImpression

Class Overview

What ia a viewable impression?


A viewable impression is one that has met the following criteria:
  • Pixel Requirement: Greater than or equal to 50% of the pixels (Density- Independent) in the offer were on an in-focus browser or a fully downloaded, opened, initialized application, on the viewable space of the device.
  • Time Requirement: The time the pixel requirement is met was greater than or equal to one continuous second, post offer render. The clock starts once the pixel requirement is met.
  • User Interaction: A strong user interaction with the offer can substitute the above requirements (i.e. a tap on the offer).

Summary

Public Constructors
ViewableImpression(String url, String offerId, CreativeType creativeType, VisibleRateType visibleRateType, float visibleRate)
Creates a Viewable Impression instance to be tracked.
Public Methods
boolean equals(Object o)
CreativeType getCreativeType()
An enum value representing the creative type of the offer associated with this viewable impression.
String getOfferId()
The optional Button-provided value that identifies the rate of the served offer.
String getUrl()
The URL that is associated with the offcer.
float getVisibleRate()
The rate visible to the user.
VisibleRateType getVisibleRateType()
An enum value representing type of the visibleRate for the offer that is displayed to the user, either PERCENT or FIXED.
int hashCode()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ViewableImpression (String url, String offerId, CreativeType creativeType, VisibleRateType visibleRateType, float visibleRate)

Creates a Viewable Impression instance to be tracked.

Parameters
url The url of the served offer.
offerId The Button-provided value that identifies the rate of the served offer.
creativeType An enum value representing the creative type of the offer.
visibleRateType The visibleRateType of the served offer.
visibleRate The visibleRate of the served offer.

Public Methods

public boolean equals (Object o)

public CreativeType getCreativeType ()

An enum value representing the creative type of the offer associated with this viewable impression. Default is OTHER

Returns
  • The enum value representing the creative type of the offer.

public String getOfferId ()

The optional Button-provided value that identifies the rate of the served offer.

Returns
  • The Button-provided value that identifies the rate of the served offer.

public String getUrl ()

The URL that is associated with the offcer.

Returns
  • The url of the served offer.

public float getVisibleRate ()

The rate visible to the user. If the VisibleRateType is FIXED, this value represents the amount in the currency of the offer. Otherwise, if it is PERCENT, this will be a value ranging from 0.0 to 100.0.

Returns
  • The visible rate of the served offer.

public VisibleRateType getVisibleRateType ()

An enum value representing type of the visibleRate for the offer that is displayed to the user, either PERCENT or FIXED. Default is UNKNOWN

Returns
  • The visible rate type of the served offer.

public int hashCode ()