-jio-start-block-type-2
-jio-style-title
Call the following API on your app's launch, preferably in the onCreate()
method of the App class.
JioAds.getInstance().init(context)
-jio-style-title
Call this API to set the endpoint of the SDK with any one value for the parameter – “sit” or “stg” or “Prod”.
jioAdsEventService?.setConfigEnvironment ("Prod")
-jio-style-title
Invoke the following API when your app is exiting, preferably in the onDestroy()
method of the MainActivity
JioAds.getInstance().release()
-jio-style-title
If needed, enable / disable debug logs for the JioAds SDK by calling setLogLevel()
API
JioAds.getInstance().setLogLevel(LogLevel logLevel)
Possible values for LogLevel
are as below
-jio-tables
# | Log Level Parameter Value | Description |
---|---|---|
1 | JioAds.LogLevel.NONE | Disable Logs (No logs will be printed) |
2 | JioAds.LogLevel.DEBUG | To enable debug logs |
-jio-style-title
If application wants to get the SDK parameters which includes OS info
, Device info
and any metadata, it can call below API
val sdkParams = JioAds.getInstance().getRequestParams(context, jioAdsMetaData)
//Example:
val jioAdsMetaData = HashMap<String, String>()
jioAdsMetaData.put("cat","clothes")
jioAdsMetaData.put("state", "MH")
jioAdsMetaData.put("Dist", "Mumbai")
val sdkParams = JioAds.getInstance().getRequestParams(context, jioAdsMetaData)
Log.d(TAG, "SDK request params: $ sdkParams ")
Below can be the possible output printed in log
SDK request params:
{vr=AN-2.1.12, os=1,
ifa=2a6479cd-6d2e-4ea2-ba90-ee372223e37b,
lt=0,
uid=9000196326,
trq=1733296981126,
ai=com.jio.sample,
aic=com.jio.sample,
av=4.1.0,
cc=405,
nc=874,
lc=eng_IN,
la=12.966549,
lo=77.6106376,
acc=12.533,
gts=1733295874673,
ua=Mozilla/5.0 (Linux; Android 14; 22111317I Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 Mobile Safari/537.36,
mn=22111317I,
md_dvm=22111317I,
br=Redmi,
md_dvb=Redmi,
osv=14,
md_osv=14,
sw=1080,
sh=2176,
dt=1,
ap=6,
md_nt=6,
no=405861,
so=405874,
lac=12299,
ce=102413569,
tz=India Standard Time,
md_hr=12,
md_min=53,
md_cat=clothes,
md_state=MH,
md_Dist=Mumbai,
ao=p}
Possible values for getRequestParams()
are as below
-jio-tables
# | Parameter Value | Parameter Value Description |
---|---|---|
1 | context | Pass application/activity context |
2 | jioAdsMetaData | Custom meta data HashMap<String, String>() |
-jio-style-title
-jio-tables
# | Parameter Value | Parameter Value Description | Example |
---|---|---|---|
1 | productID | Product ID | |
2 | cid | Jio Ad click ID | |
3 | revenue | Total cart value during checkout (Sum of all products price considering their quantity) | |
4 | currency | Currency | INR |
5 | prdrevenue | Single Product price x product quantity | |
6 | prdcount | Product Count | |
7 | prdprice | Single Product price | |
8 | prdid | Product ID | |
9 | searchString | Search String | |
10 | productList | List of Products | |
11 | segment | Segment of ecom products | Men, women, kids, beauty, home&Kitchen |
12 | vertical | Vertical of products below Segment | Clothing, footware, accessories |
13 | brickname | Under vertical sub categories | T-shirts, Shirts, Jeans, casual shoe, sneakers |
14 | sku | Unique product identifier | |
15 | filters | Search filters | Age, color, brand, size |
16 | listName | Campaign name for products | Diwali sale, New year sale |
17 | pincode | Pincode | 560037 |
18 | lat | Latitude | |
19 | lon | Longitude | |
20 | referrerApp | Application via which deeplink url is initiated | Chrome, My Jio |
21 | deeplinkURL | Deeplink URL | |
22 | transactionId | Transaction ID of purchase completed |
-jio-style-title
curl --location 'https://XXXXX/delivery/sapi.php' \
--header 'Content-Type: application/json' \
--data '{
"asi": "vspka93m",
"mnp": "10",
"mcr": "1",
"ai": "com.ril.tira.debug",
"os": "1",
"vr": "A-AN-1.2",
"ua": "Mozilla/5.0 (Linux; Android 10; CPH2239 Build/QP1A.190711.020; wv)
AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.120 Mobile
Safari/537.36",
"pla": "2",
"pfa": "9994",
"sk": "Dermatologically Tested",
"satpl": "32hun68dbss609u13"
}'
-jio-style-title
{
"errors": [],
"result": {
"asi":
{
"vspka93m":
{
"ads":
{
"7638583":
{
"mod":
{
"surl": [
“https://xxx/beacon/rh/stg/adcap_74117_1045251_7638583.json?ccb=[ccb]"
]
},
"config": {
"adr": "0",
"cid": "78072_74117_1045251_7638583_1_9ryxwqegwv_[ccb]",
"fmt": "0",
"c": "1045251"
},
"ad":
"{\"imptrackers\":[\"https://xxxx/cm/istg.
gif?asi=74117&source=&cb=9ryxwqegwv&dle=2&at=12&ob=8&cd=1&aud=-000&rt=2&rc=1&rcs=6052521b7625e31d4ee9cc706732484fcf850877&vr=[vr]&os=[os]&a
=78072&cn=&pn=&ct=&st=&crr=0&ma=1&b=7638583&cid=78072_74117_1045251_7638
583_1_9ryxwqegwv_[ccb]&rl=1&sm=2&srr=30.00&scs=99d746fce4f09b8397f84131b830a
865ab4308e1&ty=1&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&dai=[dai]&ifa=[ifa]&cc=[cc]&str
m=[strm]&uid=[uid]&dt=[dt]&lc=[lc]&pr=[pr]&pb=[pb]&osv=[osv]&lo=[lo]&mn=[mn]&nc=
[nc]&la=[la]&br=[br]&acc=[acc]&pa=[pa]>s=[gts]&sw=[sw]&sh=[sh]&s1i=[s1i]&av=[av]
&ip=[ip]\",\"googl.com\"],\"clktrackers\":[\"https://xxxx/delivery/ck.php?oaparams=2__a
si=74117__source=__cb=9ryxwqegwv__dle=2__at=12__ob=8__cd=1__aud=-
1__c=1045251__tm=0__li=__mi=__ro=__ag=__adg=261190__sbr=Physicians+Formula__rr=10.
0000__rt=2__rc=1__rcs=6052521b7625e31d4ee9cc706732484fcf850877__vr=[vr]__os=[os]_
_a=78072__cn=__pn=__ct=__st=__crr=0__ma=1__b=7638583__cid=78072_74117_1045251_76
38583_1_9ryxwqegwv_[ccb]__rl=1__sm=2__srr=30.00__scs=99d746fce4f09b8397f84131b83
0a865ab4308e1__ty=1__trq=[trq]__bz=[bz]__ccb=[ccb]__[cmd]__cc=[cc]__dai=[dai]__ifa=[ifa]_
_dt=[dt]__lc=[lc]__strm=[strm]__uid=[uid]__osv=[osv]__pr=[pr]__pb=[pb]__nc=[nc]__la=[la]__l
o=[lo]__mn=[mn]__acc=[acc]__br=[br]__sw=[sw]__pa=[pa]__gts=[gts]__av=[av]__ip=[ip]__sh=[
sh]__s1i=[s1i]__trackonly=1__oadest=\",\"google.com\"],\"viewableimptrackers\":[\"https:/
/xxxxx/cm/vistg.
gif?asi=74117&source=&cb=9ryxwqegwv&dle=2&at=12&ob=8&cd=1&aud=-
1&c=1045251&tm=0&li=&mi=&ro=&ag=&adg=261190&sbr=Physicians+Formula&rr=10.0
000&rt=2&rc=1&rcs=6052521b7625e31d4ee9cc706732484fcf850877&vr=[vr]&os=[os]&a
=78072&cn=&pn=&ct=&st=&crr=0&ma=1&b=7638583&cid=78072_74117_1045251_7638
583_1_9ryxwqegwv_[ccb]&rl=1&sm=2&srr=30.00&scs=99d746fce4f09b8397f84131b830a
865ab4308e1&ty=1&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&dai=[dai]&ifa=[ifa]&cc=[cc]&str
m=[strm]&uid=[uid]&dt=[dt]&lc=[lc]&pr=[pr]&pb=[pb]&osv=[osv]&lo=[lo]&mn=[mn]&nc=
[nc]&la=[la]&br=[br]&acc=[acc]&pa=[pa]>s=[gts]&sw=[sw]&sh=[sh]&s1i=[s1i]&av=[av]
&ip=[ip]\"]}\n"
}
},
"config": {
"te": "0",
"ma": "1",
"at": "12",
"rwin": "0",
"adrt": "0",
"mdt": "0",
"plr": "0",
"nwhit": "0",
"pod": "0",
"podc": 0,
"eac": 0
}
}
},
"config": {
"ls": "{}",
"ae": "0",
"te": "0",
"loc": "{\"cn\":\"\",\"st\":\"\",\"ct\":\"\",\"pn\":\"\"}"
},
"size": 2
},
"statusCode": 200,
"success": true
}
Below sample response code should be sent to the tracker API
"config": {
"adr": "0",
"cid": "78072_74117_1045251_7638583_1_9ryxwqegwv_[ccb]",
"fmt": "0",
"c": "1045251"
},
"ad":
"{\"imptrackers\":[\"https://xxxx/cm/istg.gifasi=74117&source=&cb=9ryxwqegwv&dle=2&at=12&ob=8&cd=1&aud=-000&rt=2&rc=1&rcs=6052521b7625e31d4ee9cc706732484fcf850877&vr=[vr]&os=[os]&a=78072&cn=&pn=&ct=&st=&crr=0&ma=1&b=7638583&cid=78072_74117_1045251_7638583_1_9ryxwqegwv_[ccb]&rl=1&sm=2&srr=30.00&scs=99d746fce4f09b8397f84131b830a865ab4308e1&ty=1&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&dai=[dai]&ifa=[ifa]&cc=[cc]&strm=[strm]&uid=[uid]&dt=[dt]&lc=[lc]&pr=[pr]&pb=[pb]&osv=[osv]&lo=[lo]&mn=[mn]&nc=[nc]&la=[la]&br=[br]&acc=[acc]&pa=[pa]>s=[gts]&sw=[sw]&sh=[sh]&s1i=[s1i]&av=[av]&ip=[ip]\",\"googl.com\"],\"clktrackers\":[\"https://xxxx/delivery/ck.php?oaparams=2__asi=74117__source=__cb=9ryxwqegwv__dle=2__at=12__ob=8__cd=1__aud=-1__c=1045251__tm=0__li=__mi=__ro=__ag=__adg=261190__sbr=Physicians+Formula__rr=10.0000__rt=2__rc=1__rcs=6052521b7625e31d4ee9cc706732484fcf850877__vr=[vr]__os=[os]__a=78072__cn=__pn=__ct=__st=__crr=0__ma=1__b=7638583__cid=78072_74117_1045251_7638583_1_9ryxwqegwv_[ccb]__rl=1__sm=2__srr=30.00__scs=99d746fce4f09b8397f84131b830a865ab4308e1__ty=1__trq=[trq]__bz=[bz]__ccb=[ccb]__[cmd]__cc=[cc]__dai=[dai]__ifa=[ifa]__dt=[dt]__lc=[lc]__strm=[strm]__uid=[uid]__osv=[osv]__pr=[pr]__pb=[pb]__nc=[nc]__la=[la]__lo=[lo]__mn=[mn]__acc=[acc]__br=[br]__sw=[sw]__pa=[pa]__gts=[gts]__av=[av]__ip=[ip]__sh=[sh]__s1i=[s1i]__trackonly=1__oadest=\",\"google.com\"],\"viewableimptrackers\":[\"https://xxxxx/cm/vistg.gif?asi=74117&source=&cb=9ryxwqegwv&dle=2&at=12&ob=8&cd=1&aud=-1&c=1045251&tm=0&li=&mi=&ro=&ag=&adg=261190&sbr=Physicians+Formula&rr=10.0000&rt=2&rc=1&rcs=6052521b7625e31d4ee9cc706732484fcf850877&vr=[vr]&os=[os]&a=78072&cn=&pn=&ct=&st=&crr=0&ma=1&b=7638583&cid=78072_74117_1045251_7638583_1_9ryxwqegwv_[ccb]&rl=1&sm=2&srr=30.00&scs=99d746fce4f09b8397f84131b830a865ab4308e1&ty=1&trq=[trq]&bz=[bz]&ccb=[ccb]&[cmd]&dai=[dai]&ifa=[ifa]&cc=[cc]&strm=[strm]&uid=[uid]&dt=[dt]&lc=[lc]&pr=[pr]&pb=[pb]&osv=[osv]&lo=[lo]&mn=[mn]&nc=[nc]&la=[la]&br=[br]&acc=[acc]&pa=[pa]>s=[gts]&sw=[sw]&sh=[sh]&s1i=[s1i]&av=[av]&ip=[ip]\"]}\n" }
},
-jio-end-block-type-2