Pushwoosh

This guide describes how to add and configure Pushwoosh integration.

About Integration

Apphud can send all user events in Pushwoosh, which you can use in Journeys builder and create your custom push campaign.

Step 1

  • Integrate Apphud SDK on iOS or Android.

  • Integrate Pushwoosh.

    Note :  If you haven't got a push certificate, Pushwoosh can generate it automatically. Push notification request will appear on app launch by default.

Step 2

  • At Apphud go to "Integrations" section and add Pushwoosh:
2452

Step 3

  • Enter Application ID, Sandbox Application ID (optional), :
2452

Step 4

  • You can enter your custom event names or disable some:
2452

Step 5

  • Enable integration and click Save:
2452

Match User IDs

By default, when an app with Pushwoosh SDK is launched for the first time, it sets a device HWID as a UserID. You can call setUserId on a login to set any required value to associate a device with a particular user. When a user logs out, you can reset this value to a default one with another setUserId call, e.g. to an initial HWID value.

You can set Apphud User ID property to Pushwoosh's setUserId function:

Swift

// assuming both Apphud and Pushwoosh SDKs are initialized:
Pushwoosh.sharedInstance()?.setUserId(Apphud.userID())

Custom events

If Apphud events are not enough for you, you can add Pushwoosh Recommended, General and Custom Events in your code.

  • Create custom event in Puswoosh -> Dashboard -> Events -> Add event
  • Use it in your App:

Swift

// How to integrate Event into your app
 let attributes: [String : Any] = [
  "Custom event attribute" : "string value"
]
PWInAppManager.shared().postEvent("Custom event name", withAttributes: attributes)

Objective-C

// How to integrate Event into your app
NSDictionary *attributes = @{
  @"Custom event attribute" : @"string value"
};
[[PushNotificationManager pushManager] postEvent:@“eventName” withAttributes:attributes];

Java

// How to integrate Event into your app
TagsBundle attributes = new TagsBundle.Builder()
    .putString("Custom event attribute", "string value")
    .build();
  
PushwooshInApp.getInstance().postEvent("Custom event name", attributes);