I am using the open source AmplitudeJS Audio Player in my app. I've been fooling around in an attempt to learn the Amplitude environment. AmplitudeJS includes its json list at the end of the HTML page. I'd like to place my json file in a separate file and call it by including it in the HTML head.
What I don't understand is how to get the Amplitude webpage to recognize the external json file. Amplitude json must be called using Amplitude.init.
This is what the json file looks like when included at the bottom of the Amplitude web page. I've tried referencing it from the head after creating the json file where I use Amplitude.init but it doesn't work.
<script type="text/javascript">
Amplitude.init({
"songs": [
{
"name": "Song 1",
"artist": "artist 1",
"album": "Album 1",
"url": "audio/song1.m4a",
"cover_art_url": "image1.png"
},
{
"name": "Song 2",
"artist": "artist 2",
"album": "Album 2",
"url": "audio/song2.m4a",
"cover_art_url": "image2.png"
},
{
"name": "Song 3",
"artist": "artist 3",
"album": "Album 3",
"url": "audio/song3.m4a",
"cover_art_url": "image3.png"
}] });</script>
Please be kind. I'm no coding all star.
TIA -Rachel