Skip to content

Instantly share code, notes, and snippets.

@mayait
Created August 14, 2018 05:20
Show Gist options
  • Save mayait/a09e1ed8f964c36f353482ca8ab8c055 to your computer and use it in GitHub Desktop.
Save mayait/a09e1ed8f964c36f353482ca8ab8c055 to your computer and use it in GitHub Desktop.
One Signal subscription Django Template Configuration
// Add this before body close tag.
<link rel="manifest" href="/manifest.json" />
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
<script>
var OneSignal = window.OneSignal || [];
// Register the client in onesignal
OneSignal.push(function() {
OneSignal.init({
appId: "d4fd97fc-xxxx-xxxx-xxxxx-xxxxxxxxx",
safari_web_id: 'web.onesignal.auto.08e72fe8-xxxx-xxxx-xxxx-xxxxxxxxxx',
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment