OneSignal在Web通知上发送js变量

Does anyone know how to send js variable on web notifications contents?

I'm trying the below code but s not working and I get empty content for it.

I added my PHP variable to JS variable noticeText and the content is there but in notification content shows nothing.

<script type="text/javascript">
                                var noticeText = "<?php echo $noticeTitle; ?>";
                var settings = {
                  "async": true,
                  "crossDomain": true,
                  "url": "https://onesignal.com/api/v1/notifications",
                  "method": "POST",
                  "headers": {
                    "cookie": "__cfduid=d7e029aceb39ed3bc3b64849b5358bf3a1544538404",
                    "authorization": "Basic MzVmZGQ5ZWQtNGI5OC00YTU5LWFhOGUtMTZhZWVmMzg3MGIx",
                    "content-type": "application/json"
                  },
                  "processData": false,
                  "data": 
'{"app_id": "dc44e367-f59b-41fd-a7c9-1b25cfd8cb66","included_segments": ["All"],"headings": {"en": "Hey {{ first_name }} {{ last_name }}", "tr": "Turkish {{ first_name }} {{ last_name }}"},"contents": {"en": "{{ noticeText }}", "tr": "Turkish Content"}}'
                }
                
                $.ajax(settings).done(function (response) {
                  console.log(response); 
                });
            </script>

</div>

Direct php echo worked eventualy the trick was to have it in "" an vola works like a charm