Event API
(to be used to send First App Open and App Open events)
Authentication:
We authenticate every request sent to the Tenjin server using the Tenjin SDK Key
- as a parameter api_key in the request URL, or
- as the username and leaving the password as empty in basic access authentication
POST or GET URL:
https://track.tenjin.com/v0/event
A response of {“code”:200} indicates a successful request.
Parameters:
*: required
| Parameter | Type | Description | Example |
| api_key* | String | SDK key Tenjin generated for each app. Please find it on the app page. If you use basic authentication instead, this parameter is not needed. | ENECCCVB8UQVLPSQ58S8EZXTJHA7FHDW |
| analytics_installation_id* | UUID | Tenjin generated Application install-specific identifier.Available by customer callback or SDK.Android SDKiOS SDKUnity SDK | 29eeb1610fe74997b6d53f02e9711f8c |
| advertising_id* | String | The raw advertising ID of the device. Required for Android. For iOS, it can be empty or all zeros when ATT consent is not authorized. | f024e65f3dd94f16983726bcef192d68 |
| developer_device_id* | String | The identifier for vendor (iOS only) | b6bc48fe0ce949e4b229ce6c55663fca |
| bundle_id* | String | Bundle ID of the app. | com.tenjin.wordfinder |
| platform* | String | ios, android, windows, amazon, android_other | ios |
| limit_ad_tracking | String | 1 for yes, 0 for no. | 1 |
| os_version* | String | Para Android: String os_version = String.valueOf(Build.VERSION.SDK_INT) Para iOS: [[UIDevice currentDevice] systemVersion] | 8.0 |
| app_version | Float, Decimal | The version of your app Para Android: String app_version = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName + “.” + context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode) Para iOS: [[[NSBundle mainBundle] infoDictionary] objectForKey:@”CFBundleShortVersionString”] | 1.0.3 |
| sdk_version* | String | “server” | server |
| country | String | The ISO locale country codes standard (see Apple documentation for example). | EUA |
| ip_address (required when user is opt-out) | String | The User’s IP Address. This is used to lookup country. | 71.165.85.114 |
| ad_user_data | Boolean(required by Google) | Google User Consent Signal Parameter: consent of 3P transmission of user level data for ads1 for consent granted0 for consent deniedRemove the parameter entirely from the request (do not set blank) when there is no user consent data | 1 |
| ad_personalization | Boolean | Google User Consent Signal Parameter: consent of personalized ads1 for consent granted0 for consent deniedRemove the parameter entirely from the request (do not set blank) when there is no user consent data | 1 |
| iad | Integer (required to track iAd) | 1=claimed by iAd, 0=not claimed by iAd (only used if you track iad campaigns) | 1 |
| iad_impression_ts | String (required to track iAd) | Timestamp if claimed by iAd | 2024-07-01 00:00:00 |
| referrer | String (required to track Adwords) | Collected for Android installs tracked | campaign_id%3D |
| os_version_release | String (required to track Adwords) | Para Android: String os_version_release = String.valueOf(Build.VERSION.RELEASE) Para iOS: [[UIDevice currentDevice] systemVersion] | 8.0.1 |
| build_id | String (required to track AdWords) | Para Android: String build = String.valueOf(Build.ID) Para iOS: @import Darwin.sys.sysctl; NSString *build(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“kern.osversion”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} | UP1B.231005.007 |
| locale | String (required to track AdWords) | Para Android: String locale = Locale.getDefault().toString() Para iOS: [[NSLocale currentLocale] localeIdentifier] | es_AR |
| device_model | String (required to track AdWords) | Para Android: String device = Build.MODEL; Para iOS: @import Darwin.sys.sysctl; NSString *device(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“hw.machine”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} | SM-F731A |
| source_app_store | String | Only required for android platform. default: undefined, use “googleplay” for Google play, “other” for other android stores. NOTE: if you want to track 3rd party in-app purchases for your Google play app, please do NOT send source_app_store | googleplay |
| odm_info(optional) | String | This is the string required for running probabilistic attribution via Google Ads for iOS. You will need to fetch this from the ODM SDK first. | AB7Dr_EJBWQ_lT_l1V0z5xqDB9MnLGbINV5r2w1jhVTITlm0IK7QE16Bf2sIjI_twjeMoQl3SedWsZiPtijTZ2DkUYI_H9RI6lkStqbwmBVsnu_QH4hfkuJeMwhFEzBEJCz3a8cdD2U1MRd1jwn2b_hbaHsbVO3NlE0xsExo5HtcuWmsaMdddKn9vFRPtyPQvSLjSl4AlsdyAaYg9Hw-FyYfm9eAbqrxy3NXkZtjJeXRThMG6MTNJA |
Purchase API
(to be used to send Purchase events)
Authentication:
We authenticate every request sent to the Tenjin server using the Tenjin SDK Key
- as a parameter api_key in the request URL, or
- as the username and leaving the password as empty in basic access authentication
POST or GET URL:
https://track.tenjin.com/v0/purchase
Parameters:
*: required
| Parameter | Type | Description | Example |
| api_key* | String | SDK key Tenjin generated for each app. Please find it on the app page. If you use basic authentication instead, this parameter is not needed. | ENECCCVB8UQVLPSQ58S8EZXTJHA7FHDW |
| analytics_installation_id* | UUID | Tenjin generated Application install-specific identifier.Available by customer callback or SDK.Android SDKiOS SDKUnity SDK | 29eeb1610fe74997b6d53f02e9711f8c |
| advertising_id* | String | The advertising ID of the device. Required for Android. For iOS, it can be empty or all zeros. | f024e65f3dd94f16983726bcef192d68 |
| developer_device_id* | String | The identifier for vendor (iOS only) | b6bc48fe0ce949e4b229ce6c55663fca |
| bundle_id* | String | Bundle ID of the app. | com.tenjin.wordfinder |
| platform* | String | ios, android, windows, amazon, android_other | ios or android |
| limit_ad_tracking | String | 1 for yes, 0 for no. | 1 |
| os_version | String | Para Android: String.valueOf(Build.VERSION.SDK_INT) Para iOS: [[UIDevice currentDevice] systemVersion] | 8.0 |
| app_version | Float, Decimal | The version of your app Para Android: String app_version = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName + “.” + context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode) Para iOS: [[[NSBundle mainBundle] infoDictionary] objectForKey:@”CFBundleShortVersionString”] | 1.0.3 |
| sdk_version* | String | “server” | server |
| ip_address(Required to determine device country) | String | The User’s IP Address. This is used to look up countries for Google DMA user consent parameters. | 71.165.85.114 |
| ad_user_data | Boolean(required by Google) | Google User Consent Signal Parameter: consent of 3P transmission of user level data for ads1 for consent granted0 for consent deniedRemove the parameter entirely from the request (do not set blank) when there is no user consent data | 1 |
| ad_personalization | Boolean | Google User Consent Signal Parameter: consent of personalized ads1 for consent granted0 for consent deniedRemove the parameter entirely from the request (do not set blank) when there is no user consent data | 1 |
| postcut | String | 1 for sending purchases after the platform cut | 1 |
| product_id* | String | Unique name for the product purchased. | coin_store |
| price* | Float, Decimal | The unit price of the item purchased in the currency standard unit (ex. USD is reported in dollars). | 0.99 |
| quantity* | Integer | The number of units purchased. | 1 |
| country | String | The ISO locale country codes standard (see Apple documentation for example). | EUA |
| currency* | String | The ISO currency codes used by Apple and Google (see Apple documentation for example). | USD |
| os_version_release | String (required to track Adwords) | Para Android: String os_version_release = String.valueOf(Build.VERSION.RELEASE) Para iOS: [[UIDevice currentDevice] systemVersion] | 14 |
| build_id | String (required to track AdWords) | Para Android: String build = String.valueOf(Build.ID) Para iOS: @import Darwin.sys.sysctl; NSString *build(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“kern.osversion”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} | UP1B.231005.007 |
| locale | String (required to track AdWords) | Para Android: String locale = Locale.getDefault().toString() Para iOS: [[NSLocale currentLocale] localeIdentifier] | es_AR |
| device_model | String (required to track AdWords) | Para Android: String device = Build.MODEL; Para iOS: @import Darwin.sys.sysctl; NSString *device(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“hw.machine”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} | SM-F731A |
| transaction_id (optional for receipt validation) (only for Apple) | String | The Apple IAP transaction ID. See transactionIdentifier documentation. For example: 120000449972561 | 120000449972561 |
| receipt (optional for receipt validation- not mandatory) | String (*should be decoded) | The IAP receipt. Apple: Apple base64 encoded ASN.1 receipt. See documentation. Android: Android Receipt JSON data. The INAPP_PURCHASE_DATA response code from getBuyIntent(). See documentation. For example: { “orderId”:”12999763169054705758.1371079406387615″, “packageName”:”com.tenjin.android.testapp”, “productId”:”exampleSku”, “purchaseTime”:1345678900000, “purchaseState”:0, “developerPayload”:”bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ”, “purchaseToken”:”rojeslcdyyiapnqcynkjyyjh”} | {“orderId”:”12999763169054705758.1371079406387615″,”packageName”:”com.tenjin.android.testapp”,”productId”:”exampleSku”,”purchaseTime”:1345678900000,”purchaseState”:0,”developerPayload”:”bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ”,”purchaseToken”:”rojeslcdyyiapnqcynkjyyjh”} |
| signature (optional for receipt validation- not mandatory) | String (*should be decoded) | The Android verification signature. The INAPP_DATA_SIGNATURE response code from getBuyIntent(). See documentation. For example: OTCzm6DczVc46awg3qcG6/UoUJ/lpobHf00KmAOzUmAK8Wgh+ngnhFNEy4uh/x256BEgLKFo9KgyhpAZEaBz1HOUamnCNLsJ58KxKzup/Dddig4jD4JQn9lu8ObaLHKcY8PPbn+qod4O1P8xSTKCinP9LQ93/g2koaWR2/8NzzLe1ydyiRSBIdEnLmBxLrew+Fdfgic8336AyhPm7tdWkQbf7zriqeUF1D17pXtb4ht3plp2wnrTFpWLJaxO9nSHbc+vyQFe1PN1mrFMpiEtQYPgwwfDpCeQvrGkbLKMj48gOhfCvo3oWcp5OiZRzNsS1EAMBbhaaWkrsXFu5igA1g== | OTCzm6DczVc46awg3qcG6/UoUJ/lpobHf00KmAOzUmAK8Wgh+ngnhFNEy4uh/x256BEgLKFo9KgyhpAZEaBz1HOUamnCNLsJ58KxKzup/Dddig4jD4JQn9lu8ObaLHKcY8PPbn+qod4O1P8xSTKCinP9LQ93/g2koaWR2/8NzzLe1ydyiRSBIdEnLmBxLrew+Fdfgic8336AyhPm7tdWkQbf7zriqeUF1D17pXtb4ht3plp2wnrTFpWLJaxO9nSHbc+vyQFe1PN1mrFMpiEtQYPgwwfDpCeQvrGkbLKMj48gOhfCvo3oWcp5OiZRzNsS1EAMBbhaaWkrsXFu5igA1g== |
| source_app_store | String | Only required for android platform. default: undefined, use “googleplay” for Google play, “other” for other android stores. NOTE: if you want to track 3rd party in-app purchases for your Google play app, please do NOT send source_app_store | googleplay |
If you don’t have a proper receipt or signature, don’t add the parameters at all to the request URL. We can still show the purchase without receipt or signature via S2S on the dashboard.
Custom Event API
(to be used to send all Custom Events)
Authentication:
We authenticate every request sent to the Tenjin server using the Tenjin SDK Key
- as a parameter api_key in the request URL, or
- as the username and leaving the password as empty in basic access authentication
POST or GET URL:
https://track.tenjin.com/v0/event
Parameters:
*: required
| Parameter | Type | Description | Example |
| api_key* | String | SDK key Tenjin generated for each app. Please find it on the app page. If you use basic authentication instead, this parameter is not needed. | ENECCCVB8UQVLPSQ58S8EZXTJHA7FHDW |
| analytics_installation_id* | UUID | Tenjin generated Application install-specific identifier.Available by customer callback or SDK.Android SDKiOS SDKUnity SDK | 29eeb1610fe74997b6d53f02e9711f8c |
| advertising_id* | String | The advertising ID of the device. Required for Android. For iOS, it can be empty or all zeros. | f024e65f3dd94f16983726bcef192d68 |
| developer_device_id* | String | The identifier for vendor (iOS only) | b6bc48fe0ce949e4b229ce6c55663fca |
| bundle_id* | String | Bundle ID of the app. | com.tenjin.wordfinder |
| platform* | String | ios, android, windows, amazon, android_other | ios |
| limit_ad_tracking | String | 1 for yes, 0 for no. | 1 |
| os_version*(Required for Google Ads) | String | Para Android: String.valueOf(Build.VERSION.SDK_INT) Para iOS: [[UIDevice currentDevice] systemVersion] | 8.0 |
| app_version*(Required for Google Ads) | Float, Decimal | The version of your app Para Android: String app_version = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName + “.” + context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode) Para iOS: [[[NSBundle mainBundle] infoDictionary] objectForKey:@”CFBundleShortVersionString”] | 1.0.3 |
| sdk_version* | String | “server” | server |
| ip_address | String | The User’s IP Address. This is used to lookup country. | 71.165.85.114 |
| ad_user_data | Boolean(required by Google) | Google User Consent Signal Parameter: consent of 3P transmission of user level data for ads1 for consent granted0 for consent deniedRemove the parameter entirely from the request (do not set blank) when there is no user consent data | 1 |
| ad_personalization | Boolean | Google User Consent Signal Parameter: consent of personalized ads1 for consent granted0 for consent deniedRemove the parameter entirely from the request (do not set blank) when there is no user consent data | 1 |
| event* | String | This is the name of the event – event name (e.g. “tutorial_complete”, “registration_complete”, or “level_1_complete”) | event_complete |
| value* | Nil, Integer | Value tied to the event name (above). This can be used for calculating values related to an event name. (e.g want to calculate the number of virtual currency for a specific event). | 10 |
| os_version_release | String (required to track Adwords) | Para Android: String os_version_release = String.valueOf(Build.VERSION.RELEASE) Para iOS: [[UIDevice currentDevice] systemVersion] | 14 |
| build_id | String (required to track AdWords) | Para Android: String build = String.valueOf(Build.ID) Para iOS: @import Darwin.sys.sysctl; NSString *build(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“kern.osversion”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} | UP1B.231005.007 |
| locale | String (required to track AdWords) | Para Android: String locale = Locale.getDefault().toString() Para iOS: [[NSLocale currentLocale] localeIdentifier] | es_AR |
| device_model | String (required to track AdWords) | Para Android: String device = Build.MODEL; Para iOS: @import Darwin.sys.sysctl; NSString *device(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“hw.machine”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} | SM-F731A |
| source_app_store | String | Only required for android platform. default: undefined, use “googleplay” for Google play, “other” for other android stores. NOTE: if you want to track 3rd party in-app purchases for your Google play app, please do NOT send source_app_store | googleplay |