Class JtAdEvent
You can use this event to capture details of an ad like load, click, show etc. For ad impression revenue justtrack SDK automatically tracks it for integrated networks. For networks not integrated you can use forwardAdImpression()
Hierarchy
AppEvent
+ JtAdEvent
Constructors
Constructor
new JtAdEvent(
jt_action: string,
jt_ad_bundle_id?: undefined | string,
jt_ad_instance_name?: undefined | string,
jt_ad_network?: undefined | string,
jt_ad_placement?: undefined | string,
jt_ad_sdk?: undefined | string,
jt_ad_segment?: undefined | string,
jt_ad_unit?: undefined | string,
jt_ad_test_group?: undefined | string,
duration?: null | number,
unit?: null | TimeUnitGroup,
): JtAdEvent
Parameters
Name | Type | Description |
---|---|---|
jt_action | string | - |
jt_ad_bundle_id | undefined | string = undefined | - |
jt_ad_instance_name | undefined | string = undefined | - |
jt_ad_network | undefined | string = undefined | - |
jt_ad_placement | undefined | string = undefined | - |
jt_ad_sdk | undefined | string = undefined | - |
jt_ad_segment | undefined | string = undefined | - |
jt_ad_unit | undefined | string = undefined | - |
jt_ad_test_group | undefined | string = undefined | - |
duration | null | number = null | - |
unit | null | TimeUnitGroup = null | - |
Returns
JtAdEvent
Overrides AppEvent.constructor
Methods
addDimension
addDimension(key: string, value?: undefined | string): AppEvent
Add a dimension with the given name and value.
Parameters
Name | Type | Description |
---|---|---|
key | string | A unique name to be added to dimension's map |
value | undefined | string = undefined | A value that associate to the given name. |
Returns
AppEvent
The modified app event for chaining.
getDimensions
getDimensions(): Record<string, string>
Get the dimension of the event.
Returns
Record<string, string>
The dimension of the event.
getName
getName(): string
Get the name of the event.
Returns
string
The name of the event.
getValue
getValue(): null | Value | Money
Get the Value or Money of the event.
Returns
null | Value | Money
The Value of Money of the event.
removeDimension
removeDimension(key: string): AppEvent
Remove a dimension with the given name form an event again.
Parameters
Name | Type | Description |
---|---|---|
key | string | The name of the dimension to be removed again. |
Returns
AppEvent
The modified app event for chaining.
setValue
setValue(value: null | Value | Money): AppEvent
Set the Value or Money of the event to the given values. There can only be either Value or Money assigns to the event.
Parameters
Name | Type | Description |
---|---|---|
value | null | Value | Money | The new Value or Money of the event. |
Returns
AppEvent
The modified app event for chaining.