A javascript example of an implementation of the DeltaDNA REST API
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 3 commits ahead of StevenStip:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources
LICENSE
README.md
index.html

README.md

DeltaDNA_REST_js

A javascript example of an implementation of the DeltaDNA REST API.

Configuration

collectURL: the URL used as collect endpoint

envKey: the environmentKey of the account the data is sent to.

Operation

This example uses the localStorage to store the userID, when a userID is not known in there it will create a new user and record the newPlayer event. For the session the sessionStorage is used. When reloading the page the session does not end, this makes a multi page client a possibility.

Events are stored in memory until they are sent to the collect endpoint by the sendEvents call. Make sure to call the sendEvents function before switching to a new page.