InTarget
  • Requirements for product API
  • Email API
  • Push Notifications
Powered by GitBook
On this page

Was this helpful?

Push Notifications

These instructions describe how to setup Push Notifications

Website

Please get in touch with [email protected] to get an access token

Installing push notifications on your website is very simple. It only takes two steps:

  1. Upload the file provided by the InTarget team to the root folder of your site;

  2. Add the script provided by the InTarget team to all your site pages.

<script type="module">
  import { InTargetFBaseMessaging } from "https://api.intarget.app/intarget-fb-messaging.js";
  // put your data here
  const projectConfig = {
    projectId: '',
    playerId: '',
  };
  const accessToken = 'accessToken';
  const messaging = new InTargetFBaseMessaging();
  await messaging.init(projectConfig, accessToken);
  await messaging.setOnMessageHandler();
</script>

If you send an empty playerId, we will save the token as an unregistered user. The token will be transferred to the registered user as soon as the ID appears, and the guest will be deleted.

Inside InTarget, you can send push notifications to all unregistered users without the possibility of segmentation (except for the platform).

PreviousEmail API

Last updated 1 year ago

Was this helpful?