### Android App Metadata Example
Source: https://developers.apptweak.com/reference/app-metadata-current
Provides an example structure for Android app metadata, including the app's package name and details like title and short description. This demonstrates how app-specific information is organized.
```json
{
"result": {
"type": "object",
"properties": {
"com.supercell.squad": {
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"title": {
"type": "string",
"example": "Squad Busters"
},
"short_description": {
"type": "string",
"example": "Fun multiplayer games. Party action! Collect & Evolve Supercell Characters!"
},
"long_description": {
"type": "string"
}
}
}
}
}
}
}
}
```
--------------------------------
### AppTweak Top Installs Keywords API
Source: https://context7_llms
Returns a list of recommended keywords for which a specific app is performing well. This helps identify keywords that drive installs for an app.
```URL
https://developers.apptweak.com/reference/keyword-suggestions-app.md
```
--------------------------------
### AppTweak API Request Metadata Example
Source: https://developers.apptweak.com/reference/cpp-by-keyword
This snippet shows an example of the metadata associated with an AppTweak API request for CPP keyword breakdowns. It includes details about the request path, parameters used, cost, and status code.
```json
{
"metadata": {
"request": {
"path": "/api/public/store/cpps/breakdown/keywords",
"params": {
"device": "iphone",
"country": "us",
"language": "us",
"start_date": "2025-06-17",
"end_date": "2025-07-16",
"keyword": "running app"
},
"cost": 196,
"max_credit_cost": 196,
"status": 200
},
"response": null
}
}
```
--------------------------------
### Load CSS for UI Styles and Components
Source: https://developers.apptweak.com/recipes/featured-content-vs-download-estimates
Loads various CSS files that define the user interface styles for different components of the project, including main UI elements, view containers, headers, search components, and recipes.
```HTML
```
--------------------------------
### Fetch In-App Events Report (GET /accounts/ios/reports/in_app_events)
Source: https://developers.apptweak.com/reference/app-store-connect-by-in-app-event
This endpoint allows you to retrieve reports related to your AppTweak integrations, broken down by in-app events. It requires parameters such as the integrated account ID, the property for the report (e.g., 'units', 'installs'), and a list of in-app event IDs. Optional parameters include app IDs, countries, start date, and end date.
```json
{
"openapi": "3.1.0",
"info": {
"title": "apptweak-integrations-api",
"version": "1"
},
"servers": [
{
"url": "https://public-api.apptweak.com/api/public/integrations"
}
],
"components": {
"securitySchemes": {
"sec0": {
"type": "apiKey",
"in": "header",
"name": "x-apptweak-key",
"x-default": "APPTWEAK-API-KEY"
}
}
},
"security": [
{
"sec0": []
}
],
"paths": {
"/accounts/ios/reports/in_app_events": {
"get": {
"summary": "App Store Connect by In-App Event",
"description": "The integrations reports endpoints allow you to fetch different reports related to your integrations in AppTweak with a breakdown by in-app event.",
"operationId": "app-store-connect-by-in-app-event",
"parameters": [
{
"name": "id",
"in": "query",
"description": "The `api-account-id` of the integrated account.
Get the list of integrated accounts using the integrated accounts endpoint. You can only pass 1 api account id. It must be an \"itunes-connect\" integration.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "property",
"in": "query",
"description": "The property you want to obtain a report for.
Choose from: units, installs, redownloads, etc.
Get the list of properties in the property parameter table. You can only pass 1 property.",
"required": true,
"schema": {
"type": "string",
"enum": [
"units",
"redownloads",
"total-downloads",
"iap",
"sales",
"paying-users",
"sessions",
"active-devices",
"rolling-active-devices",
"event-impressions-unique",
"event-notification-taps",
"event-opens",
"event-page-views-unique",
"event-reminders"
]
}
},
{
"name": "in_app_events",
"in": "query",
"description": "The comma separated list of in-app event ids.",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "apps",
"in": "query",
"description": "The list of app ids separated by commas for which to fetch the report. Get the list of products using the integrated apps endpoint.
Default: all products",
"schema": {
"type": "string"
}
},
{
"name": "countries",
"in": "query",
"description": "The list of two letter country codes (ISO Alpha-2) separated by commas.
Default: all available countries",
"schema": {
"type": "string"
}
},
{
"name": "start_date",
"in": "query",
"description": "The start date for the report in the format: YYYY-MM-DD.
Default: 30 days ago",
"schema": {
"type": "string"
}
},
{
"name": "end_date",
"in": "query",
"description": "The end date for the report in the format: YYYY-MM-DD.
Default: yesterday",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"event-impressions-unique - in-app events": {
```
--------------------------------
### Initialize and Configure Userflow.js
Source: https://developers.apptweak.com/recipes/featured-content-vs-download-estimates
This snippet initializes Userflow.js with a given API key and configures its behavior, such as hiding the resource center launcher. It also handles user identification based on login status and user data, or identifies users anonymously if not logged in. It sets up Intercom settings as well.
```javascript
window.addEventListener("load", function () {
var jsonElement = document.getElementById("hub-me").attributes["data-json"];
var data = JSON.parse(jsonElement.value);
console.debug("Userflow.js:: loaded");
window.userflow.init("ct_pw5sztumsfb2zkavl465egclu4");
window.userflow.setResourceCenterLauncherHidden(false); // Hide the center launcher
if ("loggedIn" in data && data["loggedIn"] && "user" in data) {
console.log(data)
console.log(typeof(data))
console.log(data["user"])
console.log(typeof(data["user"]))
const currentUser = data["user"];
window.userflow.identify(currentUser["user_id"].toString(), {
email: currentUser["email"],
name: currentUser["name"],
user_id: currentUser["user_id"],
last_seen_at: new Date().toISOString()
});
console.debug(
`Userflow.js:: identified as AppTweak user ${currentUser["user_id"]} - ${currentUser["email"]}`
);
window.intercomSettings = {
email: currentUser["email"],
user_id: currentUser["user_id"],
hide_default_launcher: true
};
} else {
window.userflow.identifyAnonymous({ website_lead: true });
console.debug("Userflow.js:: identified as anonymous");
window.intercomSettings = {
hide_default_launcher: true
};
}
});
```
--------------------------------
### Get App Store Breakdown Data (OpenAPI)
Source: https://developers.apptweak.com/reference/cpp-by-dna
This snippet defines the GET request for the '/cpps/breakdown/dnas' endpoint in the Apptweak Store API. It specifies the operation ID, response structure, and provides an example of the JSON response containing app store intelligence data for iOS iPhones.
```json
{
"openapi": "3.1.0",
"info": {
"title": "apptweak-store-api",
"version": "1"
},
"servers": [
{
"url": "https://public-api.apptweak.com/api/public/store"
}
],
"components": {
"securitySchemes": {
"sec0": {
"type": "apiKey",
"in": "header",
"name": "x-apptweak-key",
"x-default": "APPTWEAK-API-KEY"
}
}
},
"security": [
{
"sec0": []
}
],
"paths": {
"/cpps/breakdown/dnas": {
"get": {
"description": "",
"operationId": "get_cppsbreakdowndnas",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"examples": {
"New Example": {
"summary": "New Example",
"value": ""
},
"iOS - iphone": {
"summary": "iOS - iphone",
"value": {
"result": [
{
"cpp_id": "8ede9453-a33b-4c22-8b59-50579b8315a3",
"application_id": "985615352",
"developer_id": "20089",
"developer_name": "Contents First",
"first_seen_at": "2024-10-11T02:21:52.376+00:00",
"last_seen_at": "2025-07-17T01:07:08.685+00:00",
"icon": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/16/9a/7b/169a7b9b-ac28-b0cb-fcb5-552753b7bff0/AppIcon-0-0-1x_U007emarketing-0-7-0-85-220.png/1024x1024bb.jpg",
"device_version": "iphone_6_5",
"type": "screenshot",
"url": "https://is2-ssl.mzstatic.com/image/thumb/PurpleSource126/v4/f4/86/b7/f486b79f-9243-cd4f-c732-1614751f9029/d048261e-7847-4e7f-abaa-d32f380fb134_Screen_1_-_Phone1.png/1284x2778bb.jpg"
},
{
"cpp_id": "8ede9453-a33b-4c22-8b59-50579b8315a3",
"application_id": "985615352",
"developer_id": "20089",
"developer_name": "Contents First",
"first_seen_at": "2024-10-11T02:21:52.376+00:00",
"last_seen_at": "2025-07-17T01:07:08.685+00:00",
"icon": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/16/9a/7b/169a7b9b-ac28-b0cb-fcb5-552753b7bff0/AppIcon-0-0-1x_U007emarketing-0-7-0-85-220.png/1024x1024bb.jpg",
"device_version": "iphone_6_5",
"type": "screenshot",
"url": "https://is1-ssl.mzstatic.com/image/thumb/PurpleSource116/v4/23/37/d7/2337d7b1-3b91-3020-659f-cd3dbd9444eb/cb509cad-4027-4850-8bcc-819de31c00ac_Screen_2_-_phone1.png/1284x2778bb.jpg"
},
{
"cpp_id": "8ede9453-a33b-4c22-8b59-50579b8315a3",
"application_id": "985615352",
"developer_id": "20089",
"developer_name": "Contents First",
"first_seen_at": "2024-10-11T02:21:52.376+00:00",
"last_seen_at": "2025-07-17T01:07:08.685+00:00",
"icon": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/16/9a/7b/169a7b9b-ac28-b0cb-fcb5-552753b7bff0/AppIcon-0-0-1x_U007emarketing-0-7-0-85-220.png/1024x1024bb.jpg",
"device_version": "iphone_6_5",
"type": "screenshot",
"url": "https://is4-ssl.mzstatic.com/image/thumb/PurpleSource116/v4/ab/28/13/ab28132d-8959-2c15-8b0e-edff21724b46/5f0a924c-6201-4b3d-873c-8f78923faa11_Screen_3_-_Phone1.png/1284x2778bb.jpg"
},
{
"cpp_id": "8ede9453-a33b-4c22-8b59-50579b8315a3",
"application_id": "985615352",
"developer_id": "20089",
"developer_name": "Contents First",
"first_seen_at": "2024-10-11T02:21:52.376+00:00",
"last_seen_at": "2025-07-17T01:07:08.685+00:00",
"icon": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/16/9a/7b/169a7b9b-ac28-b0cb-fcb5-552753b7bff0/AppIcon-0-0-1x_U007emarketing-0-7-0-85-220.png/1024x1024bb.jpg",
"device_version": "iphone_6_5",
"type": "screenshot",
"url": "https://is3-ssl.mzstatic.com/image/thumb/PurpleSource116/v4/1d/eb/aa/1debaa9f-b4d3-2b0f-500f-e4c603e2edc8/c90f7ad5-a4f6-44cf-9755-4b1b26fef62e_Screen_4_-_Phone1.png/1284x2778bb.jpg"
}
]
}
}
}
}
}
}
}
}
}
}
}
```
--------------------------------
### App Category Ranking History Endpoint
Source: https://developers.apptweak.com/reference/app-category-ranking-history
Defines the GET endpoint for retrieving historical app category rankings. It includes parameters for app IDs, country, device, and date ranges, along with example usage for iOS.
```json
{
"openapi": "3.1.0",
"info": {
"title": "apptweak-store-api",
"version": "1"
},
"servers": [
{
"url": "https://public-api.apptweak.com/api/public/store"
}
],
"components": {
"securitySchemes": {
"sec0": {
"type": "apiKey",
"in": "header",
"name": "x-apptweak-key",
"x-default": "APPTWEAK-API-KEY"
}
}
},
"security": [
{
"sec0": []
}
],
"paths": {
"/apps/category-rankings/history.json": {
"get": {
"summary": "App Category Ranking - History",
"description": "Returns historical rankings of an app in its main category & the category \"All\".",
"operationId": "app-category-ranking-history",
"parameters": [
{
"name": "apps",
"in": "query",
"description": "Comma separated list of app IDs. Max 5 apps are allowed.
How to find App IDs?",
"required": true,
"schema": {
"type": "string",
"default": "886427730"
}
},
{
"name": "country",
"in": "query",
"description": "Two letter country code",
"schema": {
"type": "string",
"default": "us"
}
},
{
"name": "device",
"in": "query",
"description": "The device you want to fetch the top chart for: iphone, ipad or android",
"schema": {
"type": "string",
"enum": [
"iphone",
"ipad",
"android"
],
"default": "iphone"
}
},
{
"name": "start_date",
"in": "query",
"description": "Start date of the period in format YYYY-MM-DD
Default: 30 days ago",
"schema": {
"type": "string",
"format": "date",
"default": "2022-02-01"
}
},
{
"name": "end_date",
"in": "query",
"description": "End date of the period in format YYYY-MM-DD
Default: yesterday",
"schema": {
"type": "string",
"format": "date",
"default": "2022-02-14"
}
}
],
"responses": {
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"iOS": {
"summary": "Example response for iOS",
"value": {
"response": [
{
"app_id": "886427730",
"rank": 1,
"rank_history": [
{
"date": "2022-02-01",
"rank": 1
},
{
"date": "2022-02-02",
"rank": 1
},
{
"date": "2022-02-03",
"rank": 1
},
{
"date": "2022-02-04",
"rank": 1
},
{
"date": "2022-02-05",
"rank": 1
},
{
"date": "2022-02-06",
"rank": 1
},
{
"date": "2022-02-07",
"rank": 1
},
{
"date": "2022-02-08",
"rank": 1
},
{
"date": "2022-02-09",
"rank": 1
},
{
"date": "2022-02-10",
"rank": 1
},
{
"date": "2022-02-11",
"rank": 1
},
{
"date": "2022-02-12",
"rank": 1
},
{
"date": "2022-02-13",
"rank": 1
},
{
"date": "2022-02-14",
"rank": 1
}
]
}
]
}
}
}
}
}
}
}
}
}
}
}
```
--------------------------------
### Load JavaScript for Recipes and Footer
Source: https://developers.apptweak.com/recipes/featured-content-vs-download-estimates
Loads essential JavaScript files for the 'Recipes' and 'Footer' components, likely for interactive elements and dynamic content loading. These are preloaded for performance.
```HTML
```
--------------------------------
### Get Android App Metrics (JSON)
Source: https://developers.apptweak.com/reference/keyword-metrics-current
Retrieves current performance metrics for Android applications like Coinbase and Crypto. Includes data on volume, difficulty, brand information, results, and total installs. The request parameters specify the device, country, language, keywords, and metrics to be fetched.
```JSON
{
"result": {
"coinbase": {
"volume": {
"value": 65,
"date": "2023-04-14"
},
"difficulty": {
"value": 18,
"date": "2023-04-14"
},
"brand": {
"value": {
"share_of_brand": {},
"top_app_icon": "https://play-lh.googleusercontent.com/PjoJoG27miSglVBXoXrxBSLveV6e3EeBPpNY55aiUUBM9Q1RCETKCOqdOkX2ZydqVf0",
"top_app_id": "com.coinbase.android",
"top_app_title": "Coinbase: Buy Bitcoin & Ether"
},
"date": "2023-04-14"
},
"results": {
"value": 247,
"date": "2023-04-14"
},
"all_installs": {
"value": 49647,
"date": "2023-04-14"
}
},
"crypto": {
"volume": {
"value": 55,
"date": "2023-04-14"
},
"difficulty": {
"value": 28,
"date": "2023-04-14"
},
"brand": {
"value": {},
"date": "2023-04-14"
},
"results": {
"value": 249,
"date": "2023-04-14"
},
"all_installs": {
"value": 8345,
"date": "2023-04-14"
}
}
},
"metadata": {
"request": {
"path": "/api/public/store/keywords/metrics/current.json",
"params": {
"device": "android",
"country": "us",
"language": "us",
"keywords": [
"coinbase",
"crypto"
],
"metrics": [
"volume",
"difficulty",
"brand",
"results",
"all_installs"
]
},
"cost": 101,
"max_credit_cost": 101,
"status": 200
},
"response": null
}
}
```
--------------------------------
### AppTweak API - Project Store Configuration
Source: https://developers.apptweak.com/recipes/featured-content-vs-download-estimates
This JSON object details the project store configuration for the AppTweak API, including settings for crawlers, default version, description, homepage URL, and more.
```JSON
{
"allow_crawlers": "disabled",
"canonical_url": null,
"default_version": {
"name": "1"
},
"description": "Direct access to more than 5 million apps from Apple App Store
and Google Play Store in 100+ countries via a JSON HTTP API.",
"git": {
"connection": {
"repository": null,
"organization": null,
"status": "none"
}
},
"glossary": [],
"homepage_url": "https://app.apptweak.com",
"id": "5db9bd5bc9bdf00034ea0733",
"name": "AppTweak API",
"parent": null,
"redirects": [],
"sitemap": "disabled",
"llms_txt": "disabled",
"subdomain": "apptweak",
"suggested_edits": "disabled"
}
```
--------------------------------
### Get Top Installs Keyword Suggestions by App
Source: https://developers.apptweak.com/reference/keyword-suggestions
Retrieves recommended keywords based on an app ID, focusing on keywords where the app ranked in the top 100 search results in the last 90 days. Results can be sorted by 'score', 'ranking', or 'volume' with customizable direction.
```bash
curl -X GET "https://api.apptweak.com/v1/keyword_suggestions/app/top_installs?app_id=YOUR_APP_ID&country=US&language=en&sort_by=score&sort_direction=desc"
-H "Authorization: Bearer YOUR_API_TOKEN"
```
--------------------------------
### Initialize and Configure Userflow.js
Source: https://developers.apptweak.com/recipes/trending-keywords-per-region
This snippet demonstrates the initialization of Userflow.js with a provided key and the configuration to hide the resource center launcher. It's designed to be executed after the page has fully loaded.
```JavaScript
window.addEventListener("load", function () {
var jsonElement = document.getElementById("hub-me").attributes["data-json"];
var data = JSON.parse(jsonElement.value);
console.debug("Userflow.js:: loaded");
window.userflow.init("ct_pw5sztumsfb2zkavl465egclu4");
window.userflow.setResourceCenterLauncherHidden(false); // Hide the center launcher
if ("loggedIn" in data && data["loggedIn"] && "user" in data) {
console.log(data)
console.log(typeof(data))
console.log(data["user"])
console.log(typeof(data["user"]))
const currentUser = data["user"];
window.userflow.identify(currentUser["user_id"].toString(), {
email: currentUser["email"],
name: currentUser["name"],
user_id: currentUser["user_id"],
last_seen_at: new Date().toISOString()
});
console.debug(
`Userflow.js:: identified as AppTweak user ${currentUser["user_id"]} - ${currentUser["email"]}`
);
window.intercomSettings = {
email: currentUser["email"],
user_id: currentUser["user_id"],
hide_default_launcher: true
};
} else {
window.userflow.identifyAnonymous({ website_lead: true });
console.debug("Userflow.js:: identified as anonymous");
window.intercomSettings = {
hide_default_launcher: true
};
}
});
```
--------------------------------
### Retrieve App Keyword Rankings (OpenAPI)
Source: https://developers.apptweak.com/reference/keyword-metrics-by-app-current
This snippet defines the OpenAPI specification for an endpoint that retrieves current keyword rankings for apps. It details the GET request parameters, response structure, and provides example data for iOS, including app IDs, keywords, and their associated ranking metrics.
```json
{
"openapi": "3.1.0",
"info": {
"title": "apptweak-store-api",
"version": "1"
},
"servers": [
{
"url": "https://public-api.apptweak.com/api/public/store"
}
],
"components": {
"securitySchemes": {
"sec0": {
"type": "apiKey",
"in": "header",
"name": "x-apptweak-key",
"x-default": "APPTWEAK-API-KEY"
}
}
},
"security": [
{
"sec0": []
}
],
"paths": {
"/apps/keywords-rankings/current.json": {
"get": {
"description": "",
"operationId": "get_appskeywords-rankingscurrent",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"examples": {
"iOS": {
"summary": "iOS",
"value": {
"result": {
"317469184": {
"super bowl": {
"rank": {
"value": 7,
"date": "2025-08-22",
"effective_value": 7,
"fetch_performed": true
},
"installs": {
"value": 0.202,
"date": "2025-08-22",
"effective_value": 0.202
},
"relevancy": {
"value": 81,
"date": "2025-08-22",
"effective_value": 81
},
"kei": {
"value": 46,
"date": "2025-08-22",
"effective_value": 46
},
"chance": {
"value": 79,
"date": "2025-08-22",
"effective_value": 79
}
},
"nfl": {
"rank": {
"value": 5,
"date": "2025-08-22",
"effective_value": 5,
"fetch_performed": true
},
"installs": {
"value": 62.592,
"date": "2025-08-22",
"effective_value": 62.592
},
"relevancy": {
"value": 85,
"date": "2025-08-22",
"effective_value": 85
},
"kei": {
"value": 100,
"date": "2025-08-22",
"effective_value": 100
},
"chance": {
"value": 83,
"date": "2025-08-22",
"effective_value": 83
}
},
"sports": {
"rank": {
"value": 3,
"date": "2025-08-22",
"effective_value": 3,
"fetch_performed": true
},
"installs": {
"value": 75.227,
"date": "2025-08-22",
"effective_value": 75.227
},
"relevancy": {
"value": 56,
"date": "2025-08-22",
"effective_value": 56
},
"kei": {
"value": 98,
"date": "2025-08-22",
"effective_value": 98
},
"chance": {
"value": 91,
"date": "2025-08-22",
"effective_value": 91
}
}
}
},
"metadata": {
"request": {
"path": "/api/public/store/apps/keywords-rankings/current",
"params": {
"device": "iphone",
"country": "us"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
```
--------------------------------
### Get iOS iPad App Metrics (JSON)
Source: https://developers.apptweak.com/reference/keyword-metrics-current
Retrieves current performance metrics for iOS iPad applications like Spotify and Podcast. Includes data on volume, difficulty, brand information, results, and total installs. The request parameters specify the device, country, language, keywords, and metrics to be fetched.
```JSON
{
"result": {
"spotify": {
"volume": {
"value": 84,
"date": "2023-04-14"
},
"difficulty": {
"value": 72,
"date": "2023-04-14"
},
"brand": {
"value": {
"share_of_brand": {},
"top_app_icon": "https://is4-ssl.mzstatic.com/image/thumb/Purple112/v4/a0/61/f7/a061f7ea-a932-e14c-8eaa-40437eeeb474/AppIcon-0-1x_U007emarketing-0-6-0-0-0-85-220-0.png/1024x1024bb.jpg",
"top_app_id": 324684580,
"top_app_title": "Spotify - Music and Podcasts"
},
"date": "2023-04-14"
},
"results": {
"value": 151,
"date": "2023-04-14"
},
"all_installs": {
"value": null,
"date": "2023-04-14"
}
},
"podcast": {
"volume": {
"value": 66,
"date": "2023-04-14"
},
"difficulty": {
"value": 49,
"date": "2023-04-14"
},
"brand": {
"value": {},
"date": "2023-04-14"
},
"results": {
"value": 2870,
"date": "2023-04-14"
},
"all_installs": {
"value": null,
"date": "2023-04-14"
}
}
},
"metadata": {
"request": {
"path": "/api/public/store/keywords/metrics/current.json",
"params": {
"device": "ipad",
"country": "us",
"language": "us",
"keywords": [
"spotify",
"podcast"
],
"metrics": [
"volume",
"difficulty",
"brand",
"results",
"all_installs"
]
},
"cost": 101,
"max_credit_cost": 101,
"status": 200
},
"response": null
}
}
```
--------------------------------
### Configure AI Features and Navigation
Source: https://developers.apptweak.com/recipes/app-keyword-ranking-evolution
This snippet shows the configuration for AI features, enabling options like ChatGPT, Claude, and Copilot. It also details navigation settings, including the visibility of different menu items like 'Home', 'GraphQL', 'Guides', 'API Reference', and 'Recipes'.
```json
{
"ai": {
"dropdown": "enabled",
"options": {
"chatgpt": "enabled",
"claude": "enabled",
"clipboard": "enabled",
"copilot": "enabled",
"view_as_markdown": "enabled"
}
},
"navigation": {
"first_page": "reference",
"left": [],
"logo_link": "landing_page",
"page_icons": "enabled",
"right": [
{
"type": "link_url",
"title": "My API token 🔑",
"url": "https://app.apptweak.com/apt-api/?",
"custom_page": null
}
],
"sub_nav": [],
"subheader_layout": "links",
"version": "disabled",
"links": {
"home": {
"label": "Home",
"visibility": "disabled"
},
"graphql": {
"label": "GraphQL",
"visibility": "disabled"
},
"guides": {
"label": "Guides",
"alias": null,
"visibility": "disabled"
},
"reference": {
"label": "API Reference",
"alias": null,
"visibility": "enabled"
},
"recipes": {
"label": "Recipes",
"alias": null,
"visibility": "enabled"
},
"changelog": {
"label": "Changelog",
"alias": null,
"visibility": "disabled"
},
"discussions": {
"label": "Discussions",
"alias": null,
"visibility": "disabled"
}
}
}
}
```
--------------------------------
### Initialize and Configure Userflow.js
Source: https://developers.apptweak.com/recipes/featured-content-vs-download-estimates
This snippet demonstrates the core logic for initializing Userflow.js, setting resource center visibility, and identifying users based on their login status. It handles both logged-in users with specific attributes and anonymous users, configuring Userflow and Intercom settings accordingly.
```JavaScript
window.addEventListener("load", function () {
var jsonElement = document.getElementById("hub-me").attributes["data-json"];
var data = JSON.parse(jsonElement.value);
console.debug("Userflow.js:: loaded");
window.userflow.init("ct_pw5sztumsfb2zkavl465egclu4");
window.userflow.setResourceCenterLauncherHidden(false); // Hide the center launcher
if ("loggedIn" in data && data["loggedIn"] && "user" in data) {
console.log(data)
console.log(typeof(data))
console.log(data["user"])
console.log(typeof(data["user"]))
const currentUser = data["user"];
window.userflow.identify(currentUser["user_id"].toString(), {
email: currentUser["email"],
name: currentUser["name"],
user_id: currentUser["user_id"],
last_seen_at: new Date().toISOString()
});
console.debug(
`Userflow.js:: identified as AppTweak user ${currentUser["user_id"]} - ${currentUser["email"]}`
);
window.intercomSettings = {
email: currentUser["email"],
user_id: currentUser["user_id"],
hide_default_launcher: true
};
} else {
window.userflow.identifyAnonymous({ website_lead: true });
console.debug("Userflow.js:: identified as anonymous");
window.intercomSettings = {
hide_default_launcher: true
};
}
});
```
--------------------------------
### Fetch Google Play Units Report Data
Source: https://developers.apptweak.com/reference/google-play-reports
This snippet demonstrates how to retrieve daily and total device and user installs, along with growth metrics, for a specified date range and country from the Google Play Reports Statistics endpoint. It requires specifying parameters like start date, end date, property ('units'), and country.
```JSON
{
"result": {
"my.dummy.app": [
{
"fr": {
"start_date": "2022-12-14",
"end_date": "2022-12-15",
"daily_devices": [
23,
13
],
"total_devices": 36,
"daily_users": [
20,
7
],
"total_users": 27,
"devices_growth": 18,
"users_growth": 13.5,
"devices_growth_variation": -5.5,
"users_growth_variation": -5.5
}
}
]
},
"metadata": {
"request": {
"path": "/api/public/integrations/accounts/reports",
"params": {
"start_date": "2022-12-14",
"end_date": "2022-12-15",
"id": "{my-api-account-id}",
"devices": [
"android"
],
"property": "units",
"apps": null,
"countries": [
"fr"
]
},
"cost": 1,
"max_credit_cost": 1,
"status": 200
},
"response": null
}
}
```
--------------------------------
### Zoom Meeting Installs Data Structure
Source: https://developers.apptweak.com/reference/keyword-metrics-by-app-history
This JSON structure details the install metrics for Zoom Video Meetings. It contains a list of objects, each with a 'value' representing the install count, a 'date', and an 'effective_value'.
```json
{
"result": {
"us.zoom.videomeetings": {
"meeting": {
"installs": [
{
"value": 1.292,
"date": "2025-08-01",
"effective_value": 1.292
},
{
"value": 2.041,
"date": "2025-08-02",
"effective_value": 2.041
},
{
"value": 1.037,
"date": "2025-08-03",
"effective_value": 1.037
},
{
"value": 1.037,
"date": "2025-08-04",
"effective_value": 1.037
},
{
"value": 0.656,
"date": "2025-08-05",
"effective_value": 0.656
},
{
"value": 0.656,
"date": "2025-08-06",
"effective_value": 0.656
},
{
"value": 1.549,
"date": "2025-08-07",
"effective_value": 1.549
},
{
"value": 1.549,
"date": "2025-08-08",
"effective_value": 1.549
},
{
"value": 0.716,
"date": "2025-08-09",
"effective_value": 0.716
},
{
"value": 0.656,
"date": "2025-08-10",
"effective_value": 0.656
},
{
"value": 0.716,
"date": "2025-08-11",
"effective_value": 0.716
}
]
}
}
}
}
```