Configuration

How to customize Perfecty Push?


These are the different areas you can configure:

1. Public widget

They affect the controls shown in the front page (the Subscription prompt/the Bell icon).

images/settings-widget.png

Each of the values is described below:

SettingDefault valueDescription
EnabledTrueShow the widget in your website public frontend.
Display after this number of visits0Required number of visits to the website before displaying the subscription prompt.
Do not use widgets (ask permissions directly)FalseAsk permissions right after the use visits the website. Will not show the dialog/bell controls.
Hide bell after subscribingFalseHides the bell after the user has subscribed to your website. Note that the users will not have a way to unsubscribe and will be forced to revoke you the Browser permissions.
Subscribe text''This is the text of the question asked to the user for subscribing to Push Notifications. (Default: Do you want to receive notifications?)
Continue text''Text of the Button to continue (Default: Continue)
Cancel text''Text of the Button to cancel (Default: Cancel)
Bell title''Title of the Settings dialog when the Bell icon is clicked (Default: Notifications preferences)
Opt-in text''Text of the Opt-in checkbox (Default I want to receive notifications)
Message on update error''Text shown when there's an error updating the preferences (Default: Could not change the preference, please try again)

2. Javascript SDK

They define how the SDK performs the registration and the Push Notifications.

images/settings-js-sdk.png

SettingDefault valueDescription
Service Worker Scope/perfecty/pushThis is the scope of the service worker. By default we use a value different than root (/)
Remove conflicting workers (Don't use it with PWA/AMP)FalseRemoves all the workers from all the scopes (useful when migrating from another provider). Don't use this in a PWA/AMP website.
Custom conflict detection''Specify a custom JS regex expression to remove specific conflicting Service Workers. More information

Default expression: (OneSignalSDKWorker|wonderpush-worker-loader|webpushr-sw|subscribers-com\/firebase-messaging-sw|gravitec-net-web-push-notifications|push_notification_sw)
Enable Client LogsFalseEnable the logs in the client (which uses the Javascript SDK). Useful for troubleshooting.

3. Notifications

Change the notifications that the users receive in their Browsers/Mobiles.

images/settings-notifications.png

SettingDefault valueDescription
Fixed notifications (do not auto hide)FalseIf checked the notifications will not disappear. Otherwise, they will fade out automatically after a couple of seconds.
Default IconWebsite's iconThe default icon to be sent in all the notifications.

4. Segmentation and Tracking

This is for the user segmentation capabilities (still under development).

images/settings-segmentation.png

For the moment it supports the following values:

PropertyDefault valueDescription
Enable and collect data from usersFalseIf enabled it will collect and store the IP address from the subscribers.
UTM analytics''Paste the UTM Tracking for Google Analytics, for example: utm_source=perfecty-push&utm_medium=web-push&utm_campaign=my-campaign-name.

5. Post publishing

How to send notifications automatically after publishing a Post.

images/settings-post-publishing.png

SettingDefault valueDescription
Always send a notificationFalseIt will always send a Push Notification when a Post is published. You can define it per post in the Post's metabox.

6. Self-hosted server

Define the options for your self-hosted Push Server.

images/settings-server.png

You can define the following values:

PropertyDefault valueDescription
Vapid Private KeyAuto generatedPrivate VAPID Key
Vapid Public KeyAuto generatedPublic VAPID Key (Used in the JS SDK)
Custom REST UrlThe value returned by get_rest_url()This is the REST API url to call from the Javascript SDK
Batch Size1500Number of notifications to fetch from the Database in each sending loop. The higher the number requires higher memory, approx. 3052 * batch_size bytes. For 1500, it means ~4,36Mb of RAM used as maximum.
Parallel Flushing Size50Number of concurrent notifications to send. A high value can cause Out Of Memory errors, so please adjust with caution according to your server specs. See: Performance improvements
Enable Server LogsFalseEnables the logs in the Push Server.
Edit on GitHub