The place to add global variables is into the main template where they create the Spark global object. They have an empty array there just after Spark::scriptVariables() for you to put your own variables.
/resources/views/vendor/spark/layouts/app.blade.php
<!-- Global Spark Object -->
<script>
window.Spark = <?php echo json_encode(array_merge(
Spark::scriptVariables(), [
'app_name' => config('app.name')
]
)); ?>;
</script>
Then in js, just access with "Spark.app_name" or whatever key you assign it.