Activate Platform
Technical reference for the Activate platform. This covers the APIs and integration points for developers building custom content.
For guidance on creating Activate projects in the CMS, see Using Activate.
Overview
Activate is a lightweight platform for standalone learning activities. Key characteristics:
- Session-based — Progress tracked within the session only
- No team management — Individual learner experience
- Quick deployment — Minimal setup required
- Embeddable — Easy to embed in other applications
PostMessage API
Games and screens communicate with the Activate platform using the PostMessage API.
Sending messages
From within an iframe, send messages to Activate:
window.parent.postMessage({
message: "messageType",
// ... additional data
}, "*")
Message types
finish / finished
Marks the current activity as completed and advances to the next.
window.parent.postMessage({ message: "finish" }, "*")
// or
window.parent.postMessage({ message: "finished" }, "*")
start
Signals that the activity has started.
window.parent.postMessage({ message: "start" }, "*")
end
Signals that the activity has ended.
window.parent.postMessage({ message: "end" }, "*")
start_round
Signals the start of a round within an activity.
window.parent.postMessage({ message: "start_round" }, "*")
end_round
Signals the end of a round within an activity.
window.parent.postMessage({ message: "end_round" }, "*")
updateScore
Updates the score for the current activity.
window.parent.postMessage({
message: "updateScore",
value: 50, // Points earned
choice: "option_a", // Identifier for the choice
type: "NORMAL" // Optional: "NORMAL" or "BONUS"
}, "*")
requestForNextPage
Requests navigation to the next page/activity.
window.parent.postMessage({
message: "requestForNextPage",
score: 50, // Score for current activity
totalGameScore: 150, // Total score so far
gameId: "quiz-1", // Current activity identifier
page: 1 // Current page number
}, "*")
goBack
Requests navigation to the previous page/activity.
window.parent.postMessage({
message: "goBack",
score: 50,
totalGameScore: 150,
gameId: "quiz-1",
page: 1
}, "*")
Listening for messages
Handle messages from Activate in your custom content:
window.addEventListener("message", (event) => {
let data = event.data
// Handle string or object data
if (typeof data === "string") {
try {
data = JSON.parse(data)
} catch (e) {
return
}
}
if (data && data.message) {
switch (data.message) {
case "start":
// Activity should start
initGame()
break
case "finish":
// Activity should finish
cleanup()
break
}
}
})
TypeScript types
type FinishedMessage = { message: "finished" }
type FinishMessage = { message: "finish" }
type StartMessage = { message: "start" }
type StartRoundMessage = { message: "start_round" }
type EndRoundMessage = { message: "end_round" }
type EndMessage = { message: "end" }
type UpdateScoreMessage = {
message: "updateScore"
value: number
choice: string
type?: string
}
type RequestForNextPageMessage = {
message: "requestForNextPage"
score: number
totalGameScore: number
gameId: string | number
page: string | number
}
type GoBackMessage = {
message: "goBack"
score: number
gameId: string | number
totalGameScore: number
page: string | number
}
type PostMessage =
| FinishedMessage
| FinishMessage
| StartMessage
| StartRoundMessage
| EndRoundMessage
| EndMessage
| UpdateScoreMessage
| RequestForNextPageMessage
| GoBackMessage
Project structure
Activate projects follow a level-based file structure:
project/
├── Start/
│ ├── app-config/
│ │ └── appConfig.json
│ ├── index.html
│ └── assets/
├── Level1/
│ ├── app-config/
│ │ └── appConfig.json
│ ├── index.html
│ └── assets/
├── Level2/
│ └── ...
└── End/
├── app-config/
│ └── appConfig.json
└── index.html
Level contents
Each level folder contains:
| File/Folder | Description |
|---|---|
app-config/appConfig.json | Configuration for the activity |
index.html | Entry point for the activity |
assets/ | JavaScript, CSS, and other assets |
img/ | Images |
sfx/ | Sound effects |
videos/ | Video files |
lotties/ | Lottie animation JSON files |
Comparison with Meet
| Feature | Activate | Meet |
|---|---|---|
| Team registration | No | Yes |
| Leaderboard | No | Yes |
| Score persistence | Session only | Database |
| Admin dashboard | Basic | Full |
| Custom admin screens | No | Yes |
| Teams API | No | Yes |
| Best for | Quick activities | Live events |
