Welcome to the community Have you read this forum's "welcome" post?
Especially Step 2 should be considered here
Tutorial: Spark Variable and Function on One Web Page Publish/Read a Variable to/from the Cloud - Particle.variable() [Video Tutorial]