Server-Side Platforms
The Web Tracking API can also be integrated on server-side platforms - perfect if you wish to track pathway activities in an external LMS or any server-based platform.
In this scenario, you will be able to have more fine-grained control with deeper integration options.
Examples of Server-Side Web Activities
LMS. You would like to integrate course enrolment into a web activity, and/or you want users to complete a course on an LMS in order to mark the activity as complete on their pathway.
Utility Platforms. You have a performance or work utility platform and would like users to reach certain milestones or KPIs before the pathway activity is marked as complete.
Profile Setups. You want to automate user profile setups and sign-ins on your platform.
Automating Profile Setups & Routing
With a server-side platform, you may want to automate user registration and sign-on for the web activity. This is possible by using the pull endpoint. As the user reaches the provided URL, you will be able to use the webToken
to pull user information. The pull endpoint will provide user
object, which contains a userToken
and available personal information such as email
which can be used to identify or register a user.
The pull endpoint will additionally provide activity
object, which contains an ID
identifier and activity name
. This identifier is provided during a Web Activity setup and is used to allow an external reference to your platform. This is useful to where you would want to redirect users to a specific area on your platform e.g. course, task, or page.
Pull Data
Parameters
Key
Type
REQUIRED
webToken
String (get parameter added to the URL).
Response
Key
Type
activity
Object. Name and ID of the activity.
pathway
Object. Name and ID of the pathway.
user
Object. User information and unique userToken.
progress
Float. The stored user's progress as a percentage from 0 to 100.
message
String. A stored message string (max. 48 characters).
data
Object. A stored data result as a JSON string.
Push Data
When it comes to pushing data, you can either use the webToken
or a combination of the userToken
and the activity activity_ID
(identifier). This will be dependant on how you plan to store tokens and interact with the push endpoint. To give some scenarios, you could:
Store a Session. As the user accesses the URL from the pathway you can store the
webToken
as a session and make subsequent calls to the push endpoint using the session storedwebToken
. This makes the most sense if the activity is likely to update while the user is on your platform.Use the activity_ID with the userToken. You can also make calls to the push endpoint by using the
activity_ID
in combination with theuserToken
. As theactivity_ID
(API Identifier) is something you would provide during the Web Activity setup, you would only need to devise logic to store theuserToken
to a profile on your platform. This makes the most sense if the activity is likely to update whether the user is or is not on your platform.
Parameters Using The webToken
webToken
Key
Type
webToken
String
progress
Float. The stored user's progress as a percentage of 0 to 100.
complete
Int. The stored user's completion state. 1 = true, 0 = false.
message
String. A stored result string (max. 48 characters).
data
String. A JSON string of data to store.
Parameters Using the userToken
with activity_ID
userToken
with activity_ID
Key
Type
userToken
String
pathway
String. The name or ID of the related pathway
activity_ID
String. The API Identifier the web activity is setup with.
progress
Float. The stored user's progress as a percentage of 0 to 100.
complete
Int. The stored user's completion state. 1 = true, 0 = false.
message
String. A stored result string (max. 48 characters).
data
String. A JSON string of data to store.
Success Response
The response will contain pushed
indicating that the data has been updated along with the current progress
and complete
state.
Last updated