### Perform Magento setup and deployment Source: https://docs.xtremepush.com/docs/magento-2 Execute system upgrades, dependency injection compilation, and static content deployment after module installation. ```shell sudo php -d memory_limit=-1 bin/magento setup:upgrade sudo php -d memory_limit=-1 bin/magento setup:di:compile sudo php -d memory_limit=-1 bin/magento setup:static-content:deploy -f ``` -------------------------------- ### Enable session start tracking Source: https://docs.xtremepush.com/docs/android-events Configure the PushConnector to track session starts by calling setEnableStartSession before initialization. ```java // INITIALISE THE XTREMEPUSH CONNECTOR HERE mPushConnector = new PushConnector.Builder("XTREME_PUSH_APP_KEY", "GOOGLE_PROJECT_NUMBER") .setEnableStartSession(true) .create(this); ``` -------------------------------- ### Install Plugin with Attribution Support Source: https://docs.xtremepush.com/docs/phonegap Use this command to install a version of the plugin that includes IDFA and Android ID collection frameworks. ```bash cordova plugin add https://github.com/xtremepush/XtremePush-Phonegap#master+attributions ``` -------------------------------- ### List Devices Request Examples Source: https://docs.xtremepush.com/apidocs/list-2 Examples of JSON request bodies for filtering devices by creation time or retrieving the most recent device. ```json { "apptoken": "YOUR_APPTOKEN", "condition": [ [ "create_time", ">=", "1420070400" ] ], "offset": "0", "limit": "50" } ``` ```json { "apptoken": "YOUR_APPTOKEN", "order": "id DESC", "offset": "0", "limit": "1" } ``` -------------------------------- ### Install CocoaPods dependencies Source: https://docs.xtremepush.com/docs/ios-sdk-import Run this command in your terminal to install the specified pods. ```bash pod install ``` -------------------------------- ### Create segment response examples Source: https://docs.xtremepush.com/apidocs/create-segment Examples of successful and failed responses when creating a segment. ```json { "code": "200", "success": "True", "message": "Segment successfully created", "model": { "id": "SEGMENT_ID", "project_id": "PROJECT_ID", "title": "Test", "conditions": { "0": { "0": [ "tags", "=", "15_01_04", [ "hits", ">", "5" ], [ "daterange", "between", "2015-01-01 to 2015-01-30", "2015-01-01", "2015-01-30" ] ], "1": [ "app_downloaded", null, null, [ "days_ago", ">", null, null, null, "10" ] ], "2": [ "country", "=", "IE" ], "operator": "AND" }, "operator": "AND" } } } ``` ```json { "code": "400", "success": "False" } ``` -------------------------------- ### List User Profiles Request Examples Source: https://docs.xtremepush.com/apidocs/list-1 Examples of JSON request bodies for filtering and paginating user profiles. ```json { "apptoken": "YOUR_APPTOKEN", "condition": [ [ "email_addressable", "=", "0" ] ], "limit": "50", "offset": "0" } ``` ```json { "apptoken": "YOUR_APPTOKEN", "select": [ "email" ], "condition": [ [ "email_subscription", "=", "0" ], [ "email_addressable", "=", "1" ], [ "email", "is not", null ] ], "order": [ "id ASC", "id" ], "limit": "50", "offset": "0" } ``` -------------------------------- ### Campaign info response example Source: https://docs.xtremepush.com/docs/api-data-monitor Example JSON response for an active campaign template containing push content. ```JSON { "success": true, "code": 200, "model": { "active": 0, "messages": { "1": { "push_text": "Hi {{first_name}}, {{amount}} has been debited from your account. Tap here if you did not approve this." }, "2": { "push_text": "Hi {{first_name}}, {{amount}} has been debited from your account. Tap here if you did not approve this." }, "3": { "push_text": null }, "6": { "push_text": null }, "4": [], "7": [], "8": [], "9": [], "10": [], "11": [] } } } ``` -------------------------------- ### List list items response examples Source: https://docs.xtremepush.com/apidocs/list-list-items Examples of successful and error responses returned by the /list/list-item endpoint. ```json { "success": "True", "code": "200", "data": [ { "list_id": "3621214", "value": "user1" }, { "list_id": "3621214", "value": "user2" } ] } ``` ```json { "success": "False", "code": "400", "message": "General error information", "errors": [ { "text": [ "Detailed information about the specific error" ] } ] } ``` -------------------------------- ### List User Profiles Response Examples Source: https://docs.xtremepush.com/apidocs/list-1 Examples of successful and error response bodies for the list profile request. ```json { "success": "True", "code": "200", "data": [ { "id": "11eb0ca1064e5d178bc7061c72c7ac00", "email": "info@example.com", "email_addressable": "1", "email_subscription": "1", "timezone": "Europe/Dublin" } ] } ``` ```json { "success": "False", "code": "400", "message": "General error information" } ``` -------------------------------- ### Placeholder Token Example Source: https://docs.xtremepush.com/docs/realtime-sport-updates Example of a dynamic placeholder token used to pull data from the incoming feed. ```text {{ payload.event.home_score }} ``` -------------------------------- ### Push delivery error response example Source: https://docs.xtremepush.com/docs/api-data-monitor Example response showing a delivery failure due to application uninstallation. ```JSON { "code": 200, "success": true, "data": [{ "action_id": 759147, "campaign_id": 245624, "create_time": 1464355910, "device_id": 459923, "error_message": "Application is Uninstalled" }], } ``` -------------------------------- ### Initialize Custom HTML Configuration Source: https://docs.xtremepush.com/docs/in-app-custom-html Example of applying multiple configurations and initializing the SDK within a script block. ```HTML ``` -------------------------------- ### Request body example Source: https://docs.xtremepush.com/apidocs/list-segments Example of the JSON body required for the request, including the mandatory apptoken and optional pagination parameters. ```json { "apptoken": "string", "limit": 1, "offset": 1 } ``` -------------------------------- ### Initialize SDK Integration Source: https://docs.xtremepush.com/docs/react-native Execute the automated setup to modify native files and inject initialization code. ```bash npx xtremepush-setup init ``` -------------------------------- ### Install iOS Dependencies Source: https://docs.xtremepush.com/docs/react-native Installs required CocoaPods dependencies for the iOS project. ```bash cd ios && pod install && cd .. ``` -------------------------------- ### Full Application Delegate Integration Source: https://docs.xtremepush.com/docs/ios-inbox Complete implementation example for initializing the SDK and enabling the inbox in the application delegate. ```Objective-C - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // ... [XPush setInboxEnabled:YES]; // ... [XPush applicationDidFinishLaunchingWithOptions:launchOptions]; return YES; } ``` ```Swift func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. //Start - Initialise XPush //... XPush.setInboxEnabled(true) XPush.registerForRemoteNotificationTypes(NotificationSettings.getNotificationSettings()) XPush.applicationDidFinishLaunchingWithOptions(launchOptions) //End - Initialise XPush ``` -------------------------------- ### Install Xtremepush CLI Source: https://docs.xtremepush.com/docs/react-native Add the Xtremepush CLI to your project using npm or yarn. ```bash npm install xtremepush-react-native-cli ``` ```bash yarn add xtremepush-react-native-cli ``` -------------------------------- ### Install Plugin without Location Services Source: https://docs.xtremepush.com/docs/phonegap Use this command to install the plugin while excluding geo-location and beacon frameworks. ```bash cordova plugin add https://github.com/xtremepush/XtremePush-Phonegap#master-geo-beacon ``` -------------------------------- ### Update segment response examples Source: https://docs.xtremepush.com/apidocs/update-segment Examples of JSON responses for successful and error scenarios when updating a segment. ```json { "success": "True", "code": "200", "message": "Segment is successfully updated", "model": { "id": "SEGMENT_ID", "project_id": "PROJECT_ID", "title": "Email subscribed", "conditions": { "0": { "0": [ "email_subscription", "=", "0" ], "operator": "AND" }, "operator": "AND" } } } ``` ```json { "success": "False", "code": "400", "message": "General error information" } ``` ```json { "success": "False", "code": "404", "message": "Not Found" } ``` -------------------------------- ### PushConnector.Builder Configuration Source: https://docs.xtremepush.com/docs/android-sdk-location Methods used to initialize location, geofence, and beacon monitoring during SDK setup. ```APIDOC ## PushConnector.Builder Configuration ### Description Configures location-based features including geofencing and iBeacon monitoring during the initialization of the Xtremepush SDK. ### Methods - `setEnableLocations(boolean)`: Enables or disables general location services. - `setEnableGeo(boolean)`: Enables or disables geofence monitoring. - `setEnableBeacons(boolean)`: Enables or disables iBeacon monitoring. - `setLocationUpdateTimeout(int)`: Sets the interval in seconds for additional GPS checks. - `setLowPowerGeo(boolean)`: Disables additional location checks to save battery. ### Example ```java mPushConnector = new PushConnector.Builder("XPUSH_APP_KEY", "GOOGLE_SENDER_ID") .setEnableLocations(true) .setLocationUpdateTimeout(10) .create(this); ``` ``` -------------------------------- ### Users Topic Payload Example Source: https://docs.xtremepush.com/docs/topic-formats-payload-requirements A concrete example of a user profile update message containing a unique ID, customer ID, and specific attributes. ```json { "user_id": "3e685367-07d5-4d48-93ae-f007ac336605", "customer_id": 12345, "user_attributes": { "customer_tier": "VIP", "email": "[email protected]" }, "timestamp": "2024-09-01 12:00:00.123" } ``` -------------------------------- ### Retrieve push action details Source: https://docs.xtremepush.com/apidocs/info-push Examples of successful responses for different push notification platforms. ```JSON { "success": "True", "code": "200", "model": { "id": "801303567", "project_id": "PROJECT_ID", "application_id": "5471", "campaign_id": "53189363", "trigger_id": "641850501", "message_type": "3", "send_mode": "1", "type": "web", "environment": "chrome", "target_count": "6", "sent_count": "6", "delivery_count": "4", "open_count": "0", "click_count": "0", "error": "0", "create_time": "1617020760", "expiration_time": "1618230360", "message": { "id": "801303567", "cid": "53189363", "title": "Don't miss out!", "alert": "Get a 10% discount now", "url": "https://www.example.com/", "icon": "https://s3.xtremepush.com/application/web_icon_large_5471_5f86csdab68c0b2.png" } } } ``` ```JSON { "success": "True", "code": "200", "model": { "id": "1003204108", "project_id": "PROJECT_ID", "application_id": "5406", "campaign_id": "54019941", "trigger_id": "755580603", "message_type": "2", "send_mode": "1", "type": "android", "environment": "production", "target_count": "15", "sent_count": "14", "processing_count": "0", "error_count": "0", "delivery_count": "0", "open_count": "0", "click_count": "0", "runtime": "0", "error": "0", "create_time": "1628775045", "expiration_time": "1631194245", "encryption": "1", "message": { "value": "key", "id": "1003204108", "cid": "54019941", "xpush": "yes", "title": "Push title", "alert": "Push text goes here" } } } ``` -------------------------------- ### Successful Response: Totals Source: https://docs.xtremepush.com/apidocs/new-users Example of a 200 OK response returning the total count of new users. ```json { "code": "200", "data": { "totals": { "amount": "1015" } }, "success": "True" } ``` -------------------------------- ### Successful list creation response Source: https://docs.xtremepush.com/apidocs/create-list Example JSON response returned when a list is successfully created. ```json { "success": "True", "code": "200", "message": "List is successfully created", "model": { "id": "3810889", "project_id": "PROJECT_ID", "name": "External users", "identifier": "user_id" } } ``` -------------------------------- ### Events topic payload example Source: https://docs.xtremepush.com/docs/topic-formats-payload-requirements A concrete example of a bet event payload including user attributes and event-specific values. ```json { "event": "bet", "user_id": "3e685367-07d5-4d48-93ae-f007ac336605", "customer_id": 12345, "user_attributes": { "customer_tier": "VIP" }, "value": { "bet_id": "3e685367-07d5-4d48-93ae-f007ac336605", "odds": 12.2, "stake": 100.0 }, "timestamp": "2024-09-01 12:00:00.123" } ``` -------------------------------- ### Open URL in Browser Source: https://docs.xtremepush.com/docs/in-app-custom-html Example of using the action method to open an external URL in the device browser. ```JavaScript InAppMessage.action('url_button', 'https://xtremepush.com', 'outside'); ``` -------------------------------- ### setEnableStartSession(boolean enable) Source: https://docs.xtremepush.com/docs/android-events Configures the SDK to track session start events automatically. ```APIDOC ## setEnableStartSession(boolean enable) ### Description Enables or disables the automatic tracking of session start events. This must be called on the PushConnector.Builder before initializing the connector. ### Method `PushConnector.Builder.setEnableStartSession(boolean enable)` ### Parameters - **enable** (boolean) - Required - Set to true to enable session start tracking. ``` -------------------------------- ### Successful creation response Source: https://docs.xtremepush.com/apidocs/create-1 Example response body returned when a tag or attribute is successfully created. ```json { "success": "True", "code": "200", "message": "Tag is successfully created", "model": { "id": "60011986", "project_id": "PROJECT_ID", "title": "first_purchase", "name": "first purchase", "attribute_client": "0", "attribute_profile": "1", "type": "0" } } ``` -------------------------------- ### POST /start/campaign Source: https://docs.xtremepush.com/apidocs/start Starts a paused or stopped campaign using the provided app token and campaign ID. ```APIDOC ## POST /start/campaign ### Description Used to start a paused or stopped campaign. Note that it is not possible to start campaigns in Past status or stopped multi-stage journey campaigns. ### Method POST ### Endpoint /start/campaign ### Parameters #### Request Body - **apptoken** (string) - Required - Your App token - **id** (integer) - Required - The ID of the campaign you want to start ### Request Example { "apptoken": "YOUR_APPTOKEN", "id": "CAMPAIGN_ID" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful - **code** (integer) - Status code #### Response Example { "success": "True", "code": "200" } ``` -------------------------------- ### GET /bonus/fetch Source: https://docs.xtremepush.com/docs/bonus-engine-integration-guide Retrieves a list of active promotions or bonuses available in the system. ```APIDOC ## GET /bonus/fetch ### Description Retrieves a list of active promotions or bonuses. ### Method GET ### Endpoint /bonus/fetch ### Response #### Success Response (200) - **id** (string) - The unique identifier of the promotion - **name** (string) - The name of the promotion #### Response Example [ { "id": "183", "name": "Name of Promotion" }, { "id": "184", "name": "Name of Promotion" } ] ``` -------------------------------- ### Campaign Action Response Example Source: https://docs.xtremepush.com/docs/api-data-monitor Example JSON response showing campaign action data, including error messages for failed message deliveries. ```json { "success": true, "code": 200, "data": [{ "action_id": 313049676, "campaign_id": 9661067, "create_time": 1561385901, "error": 1, "error_message": "Required values are not set", "message_params": {"first_name": "Sam", "ref_number": "1234", "user.email": "[[email protected]](mailto:[email protected])"}, "message_type_name": "email" }, { "action_id": 311506802, "campaign_id": 9661067, "create_time": 1561314578, "error": 1, "error_message": "Required values are not set", "message_params": {"user.email": "[[email protected]](mailto:[email protected])"}, "message_type_name": "email" }] } ``` -------------------------------- ### Enable Attribution Tracking Source: https://docs.xtremepush.com/docs/ios-sdk-releases Enables mobile install attribution tracking. Requires the AdSupport.framework. ```Objective-C [XPush setAttributionsEnabled: YES]; ``` -------------------------------- ### Match Started Campaign Content Source: https://docs.xtremepush.com/docs/realtime-sport-updates Template for a match started notification. ```text Match started {{ payload.event.home_team }} - {{ payload.event.away_team }} ``` -------------------------------- ### Attributes condition example Source: https://docs.xtremepush.com/apidocs/segment-modal-properties Example structure for defining attribute-based conditions. ```json [ "tags_attributes", "=", "TAG_ID or TAG_TITLE", ["value", "> / < / = / !=", "some value"] ] ``` -------------------------------- ### Flags condition example Source: https://docs.xtremepush.com/apidocs/segment-modal-properties Example structure for defining flag-based conditions. ```json [ "tags_flag", "=", "TAG_ID or TAG_TITLE", ["status", "=", "on / off"] ] ``` -------------------------------- ### Generate Configuration File Source: https://docs.xtremepush.com/docs/react-native Create the configuration template in the project root. ```bash npx xtremepush-setup generate-config ``` -------------------------------- ### OTP Execute Response Examples Source: https://docs.xtremepush.com/apidocs/otp-execute Standard response formats for successful and unauthorized OTP execution requests. ```json { "requestID": "", "code": "Success" } ``` ```json { "success": "False", "code": "401", "message": "Unauthorized" } ``` -------------------------------- ### Period Start Campaign Content Source: https://docs.xtremepush.com/docs/realtime-sport-updates Template for a second half start notification. ```text Second half started {{ payload.event.home_team }} - {{ payload.event.away_team }} ``` -------------------------------- ### Verify SDK Integration Source: https://docs.xtremepush.com/docs/react-native Run the verification command to check the current project setup and identify potential configuration issues. ```bash npx xtremepush-setup verify --verbose ``` -------------------------------- ### List Devices Success Response Source: https://docs.xtremepush.com/apidocs/list-2 Example of a successful 200 response containing device data. ```json { "code": "200", "success": "True", "data": [ { "id": "DEVICE_ID", "create_time": "1420589115", "open_time": "1420589115", "token": "f40b0df2aa78349918ae1f837275c9233f524bd09ac18fb3cc174e6e80a134ca", "active": "1", "addressable": "1", "type": "ios", "environment": "production", "device_id": "9CEFBF8C-9C9F-4242-ADE5-8942FC67806E", "device_type": "iPhone", "device_model": "iPhone5,2", "device_model_name": "iPhone 5", "device_os": "2002-08-01T00:00:00Z", "name": "Test Device", "timezone": "Europe/Dublin", "country": "IE", "language": "en", "carrier_name": "Vodafone", "app_version": "2026-01-01T00:00:00Z", "lib_version": "i22022015" } ] } ``` -------------------------------- ### Create helper-frame.html Source: https://docs.xtremepush.com/docs/web-sdk-for-amp-pages This file initializes the Xtremepush SDK. Replace 'path/to/sdk.js' with the actual path provided in your Xtremepush platform integration settings. ```html
``` -------------------------------- ### Successful Task List Response Source: https://docs.xtremepush.com/apidocs/list-tasks Example JSON response returned when the task list is successfully retrieved. ```json { "success": "True", "code": "200", "data": [ { "id": "5853", "project_id": "1", "identifier": "profile_import", "params": { "fileId": "11ead35649121a69b6400a5174242624", "profileIdentifier": "1" }, "errors": { "file[columns]": [ "Column 'firstname' is not set to be a profile attribute" ], "file[rows]": [ "Rows must contain identifier (Row 4)" ] }, "create_time": "1596217813", "start_time": "1596217813", "finish_time": "1596217813", "status": "2" }, { "id": "5852", "project_id": "1", "identifier": "profile_import", "params": { "fileId": "11ead35443ecf5b6b6400a5174242624", "profileIdentifier": "1" }, "errors": { "file[columns]": [ "Column 'first.name' is not a recognized user profile field or attribute", "Column 'LTV' is not a recognized user profile field or attribute" ] }, "create_time": "1596216945", "start_time": "1596216946", "finish_time": "1596216946", "status": "2" }, { "id": "62", "project_id": "1", "identifier": "profile_import", "params": { "fileId": "11ea41e98278cd8abd07065d6cbde52a", "profileIdentifier": "1" }, "errors": { "file[rows]": [ "7 Rows must contain identifier ( Row 6, Row 11, Row 13, Row 18, ...)", "9 Rows are duplicates ( Row 12, Row 14, Row 15, Row 19, ...)" ] }, "create_time": "1580228176", "start_time": "1580228176", "finish_time": "1580228176", "status": "2" } ] } ``` -------------------------------- ### Install Cordova Plugin Source: https://docs.xtremepush.com/docs/huawei-application Run this command in your terminal to add the Xtremepush Cordova plugin for Huawei. ```bash cordova plugin add https://github.com/xtremepush/XtremePush-Phonegap#master-huawei ``` -------------------------------- ### Configure Rich Media Notifications Source: https://docs.xtremepush.com/docs/react-native Enable rich media support in the configuration file and run the setup command. ```javascript module.exports = { enableRichMedia: true, devTeam: 'YOUR_APPLE_TEAM_ID', }; ``` ```terminal npx xtremepush-setup ios ``` -------------------------------- ### Break Start Campaign Content Source: https://docs.xtremepush.com/docs/realtime-sport-updates Template for a break start notification including current scores. ```text Half time {{ payload.event.home_team }} ({{ payload.event.home_score }}) - ({{ payload.event.away_score }}) {{ payload.event.away_team }} ``` -------------------------------- ### Enable Debug Mode Source: https://docs.xtremepush.com/docs/react-native Run the initialization command with the DEBUG environment variable set to 1 to output verbose logs during setup. ```bash DEBUG=1 npx xtremepush-setup init ``` -------------------------------- ### Successful response example Source: https://docs.xtremepush.com/apidocs/profile-attribute The structure of a successful 200 OK response containing the requested profile data. ```json { "success": "True", "code": "200", "data": [ { "project_id": "2780", "profile_id": "11eb0ca1610252948bc7061c72c7ac00", "value": "Belle", "attribute_name": "first_name", "user_id": "1234", "update_time": "1633523110" } ] } ``` -------------------------------- ### Initialize the SDK in AppDelegate Source: https://docs.xtremepush.com/docs/ios-sdk-integration Configure the SDK within the application delegate's launch method using your application key. ```Swift func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { XPush.setAppKey("XPUSH_APP_KEY") #if DEBUG // Show Debug logs in debug builds XPush.setShouldShowDebugLogs(true) #endif XPush.applicationDidFinishLaunching(options: launchOptions) return true } ``` ```Objective-C - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [XPush setAppKey: @"XPUSH_APP_KEY"]; #if DEBUG // Show Debug logs in debug builds [XPush setShouldShowDebugLogs:YES]; #endif [XPush applicationDidFinishLaunchingWithOptions:launchOptions]; } ``` -------------------------------- ### Initialize SDK with Geofence and iBeacon Monitoring Source: https://docs.xtremepush.com/docs/android-sdk-location Enable geofence and iBeacon monitoring individually during SDK initialization. ```java mPushConnector = new PushConnector.Builder("XPUSH_APP_KEY", "GOOGLE_SENDER_ID") .setEnableGeo(true) .setEnableBeacons(true) .create(this); ``` -------------------------------- ### Check SDK Initialization Manually Source: https://docs.xtremepush.com/docs/react-native Use grep to search for XtremePush references in Android and iOS source files to confirm the SDK is correctly initialized. ```bash # Android - Check SDK initialization grep -r "XtremePush" android/app/src/main/java/ # iOS - Check SDK initialization grep -r "XtremePush" ios/*/AppDelegate.* ``` -------------------------------- ### List Devices API Response Source: https://docs.xtremepush.com/docs/api-data-monitor Example response for the list devices endpoint showing an array of device objects. ```json { "success": true, "code": 200, "data": [{ "id": 2453832008, "open_time": 1623233688, "active": 1, "addressable": 1, "type": "android", "external_id": null }, { "id": 2452826033, "open_time": 1623134275, "active": 1, "addressable": 0, "type": "web", "external_id": null }] } ``` -------------------------------- ### Configure Android Manifest for Install Referrer Source: https://docs.xtremepush.com/docs/kochava Register the ReferrerReceiver in your Android Manifest to handle install attribution. ```xml