How to define a test installation and then how to use it?

tech
how-to

#1

You would like to identify the installation corresponding to your device, so as to create a test segment and thus send yourself the notifications before addressing them to all your users.

The simplest way is to create a custom property bool_isTest in the installation corresponding to your device.

For the Web, you can run a little script on your browser:

  1. Go to your website and make sure you are opt in to push notifications.
  2. Open the console: press F12 or right click on the page and select Inspect, then go to the Console tab.
  3. Copy and paste the following snippet into the console; it will set the bool_isTest custom property to true in the corresponding installation on your browser:
    WonderPush.ready(function(WonderPushSDK) {
        WonderPushSDK.putInstallationCustomProperties({bool_isTest: true});
    });
    
  4. Return to your WonderPush dashboard, in the Segments page click Create segment and build this criterion:
    Installation custom field (bool) is True in field bool_isTest.
  5. Your device should now be listed. If not, allow 10-15 seconds and refresh the segment preview.

For mobile applications, either add a secret button doing the same thing or:

  1. Find yourself by segmenting your audience down to a few devices. Start by a filter on last activity to cut through the mass.
  2. Click on each device to see which really corresponds to yours and note its Device id.
  3. Then edit the segment you’ve created above to add the criterion:
    Device id is equal to (your device id).
  4. Make sure to make the segment disjunctive (using ORs instead of ANDs) by choosing:
    Users matching Any of the following conditions: above the criteria.

#3