You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Display opt in prompt to your website visitor by including it into your template. Alternatively you can manually copy and paste content of `vendor.pushmix.optin` into template. Preview in the web browser to ensure that opt in prompt is trigegred. Please note that web browser must be compatible with Push API, otherwise opt in prompt will not be displayed.
35
+
To display opt in prompt you will need to include block of javascrip into your template using Blade `@include` derictive.
36
+
37
+
Alternatively you can copy and paste content of `vendor.pushmix.optin` into template.
38
+
39
+
Preview in the web browser to ensure that opt in prompt is trigegred. Please note that web browser must be compatible with Push API, otherwise opt in prompt will not be displayed.
36
40
37
41
```bash
38
42
<body>
@@ -57,7 +61,7 @@ Display opt in prompt to your website visitor by including it into your template
57
61
## Sending Message
58
62
Sending message to your subscribers is simple. First add reference to Pushmix class, than create an array with four requiried parameters.
59
63
60
-
*`topic` - defines audience you would like to target, see bellow Retrieving Topics
64
+
*`topic` - defines audience you would like to target, see bellow Subscription Topics
61
65
*`title` - notification title, keep it short
62
66
*`body` - notification body content, keep it short
63
67
*`default_url` - valid URL, will used when user click on the notification
@@ -103,7 +107,7 @@ class PushmixController extends Controller
103
107
$msg_data = [
104
108
105
109
// Required Parameters
106
-
'topic' => 'all', // or topic id from Pushmix::getTopics()
110
+
'topic' => 'all', // or topic id from Pushmix::getTopics() call
107
111
'title' => 'Hello',
108
112
'body' => 'Welcome to Pushmix!',
109
113
'default_url' => 'https://www.pushmix.co.uk',
@@ -153,12 +157,14 @@ class PushmixController extends Controller
153
157
154
158
If you haven't specified additional topics in your subscription in the Pushmix dashboard than you don't need to read this.
155
159
156
-
Please note: you can always edit your subscription and add/or remove topics. If you have added new topics to your subscription you will need to call this method in order to obtain your topics id's.
160
+
Please note: you can always edit your subscription and add/or remove topics. If you have recently added new topics to your subscription you will need to call this method in order to obtain your topic id's.
157
161
158
-
Ability to send messages to all subscribers is great, but sometimes you only need to target those users who have expressed thier interest by opting in one of your topics. Audience segmentation is the solution.
162
+
Ability to send messages to all subscribers is great, but sometimes you only need to target those users who have expressed thier interest by opting to one of your topics.
159
163
160
-
To push message to a topic subscribers first you will need to obtain topic id by calling `Pushmix::getTopics()`
161
-
This call will return an array of topic names and id's or an empty array in case if you haven't created any topics.
164
+
Once have created topics you can segment your audience and push message to a topic subscribers.
165
+
First you will need to obtain topic id by calling `Pushmix::getTopics()`
166
+
This call will return an array of topics including name and id.
167
+
An empty array will be returned if you haven't created any topics.
162
168
163
169
```php
164
170
<?php
@@ -196,7 +202,7 @@ class PushmixController extends Controller
196
202
// Required Parameters
197
203
'topic' => '17', // subscribers of Service Updates topic only
198
204
'title' => 'New Feature',
199
-
'body' => 'Use Pushmix wihin your Laravel application, see details',
205
+
'body' => 'Use Pushmix within your Laravel application, see details',
0 commit comments