On-site messages are messages that are delivered to on-site web users when an event is triggered. Opt-in is not required for these type of messages.
On-site messages requires that you configure your web application in your Xtremepush project and that you complete the integration of the Xtremepush SDK in your website.
xtremepush('event', 'EVENT_NAME', 'EVENT_VALUE');
Review our guides for more details on events and how they can easily be deployed directly or using a tag manager product like Google Tag Manager and for info on special events such as mouse out and page scroll events.
To be able to use the on-site channel, it must first be enabled by a Project Admin user, in Settings > Channels > Enabled Channels by toggling the On-site slider and clicking on Save. No further configuration is required.
Running tests is encouraged before start sending on-site campaigns to your customers.
Once that you have enabled the on-site channel, you will be able to see On-site message as an available channel from the campaign builder page. On-site messages can only be used in standalone campaigns. To create a test campaign go to: Campaigns > Create Campaign and select In-app / On-site message.
To easily launch a test campaign you can manually fire an event from your site, with the browser developer tools, by using the SDK event method. Navigate to your site in your browser of choice and open the developer tools. Then navigate to the Console tab and use the following command (in the example we are firing an event called
An event is created in your project when you fire it for the first time from your website, or you can also manually create it by navigating to Data Manager > Events > Create event.
Once that you have fired this event or created it, you will be able to select it for use in your campaign by typing the name into the Custom event) within the Events tab. Configure the rest of options following our guide.
Navigate to the Segment tab to specify the recipients of the campaign. If you have integrated more than one website in your project, you can specify which one you want to target, otherwise the content will appear in all of them. If you have multiple users and you want to target a particular one, you can do so by selecting identifier > users IDs equals condition (this will only work if you have previously set your user ID in the Segmentation Engine.
Count recipients before launching the campaign
Whenever launching a campaign it is a best practice to use the Calculate feature to count recipients and make sure that your targeted audience for this campaign is what you are expecting.
Once you have launched the campaign, and in order to test it, you will need to go back to your site and fire the event again. The on-site message should appear immediately after you fire the event.
Troubleshooting: Debug logs
Debug logs allow you to review requests which are being made from your website to the Xtremepush project and to detect issues. See our dedicated guide for instructions on how to enable debug logs.
How to obtain your device ID?
Review our dedicated guide to learn how to obtain your device ID.
Updated about a month ago