Web Tracking

The Web Tracking API works directly with the Web Activity on Falkor Pathways and allows for light to deep integration. Web activities are experiences that happen outside of the Falkor app.

The combination of Web Activity and Web Tracking is a powerful mechanism that allows any off-app activity & pathway integration to be limited only by the imagination.

Off-app experiences can take the form of websites, LMSes, web games, single-purpose interactives, or linking through to just about any platform.

How It Works

Web Activities are added to a pathway - when setting it up, a URL to where the off-app activity is hosted must be provided.

A user interacts with the web activity on their pathway, which redirects them with a unique token as a query parameter webToken.

This token is used in conjunction with the Pathway API credentials to access the Web Activity endpoint and update the state of the web activity on the user's pathway.

Web Token

When the off-app link is accessed from the Web Activity a webToken will be passed as a query string parameter.

If you are using the Javascript API you will not need to do anything to handle or parse this token. When using the Server API you will need to parse this parameter with your calls to the push and pull endpoints.

Activity ID

When a Web Activity is set up, you have the option to provide an API Identifier. This is a reference you can provide which relates to content, a course, or a specific task on your external URL. This is very useful for server-side integrations but can also be used in web apps as way to route the user to a specific location.

Server-Side Platforms

Scenarios

Basic Tracking

The simplest form of web tracking just requires a code snippet (similar to implementing Google Analytics) to be added to the web page on which you would like to track the user for this activity.

This is useful if you just want to ensure that the user has visited the URL. When you create a Web Activity and set the activity settings to Tracking Fulfilment, a code snippet is automatically created for this scenario.

The snippet has two parameters. A publicKey of the Pathway API account, and autoCompletewhich automatically sets the activity to complete on the user's pathway.

<script src="https:://api.falkor.io/api/js/webtracking.min.js"></script> 
<script> 
    var falkor = falkorInitTracking({
        publicKey : `<Public API Token>`     
        autoComplete : 1 
    }); 
</script>

Advanced Tracking

A more advanced of web tracking utilises pull and push methods, which allow progression of the activity to be controlled by actions a user will need to take on the external URL. This can be anything from website forms, online games, web apps, or server side platforms. The Web Tracking API allows for both server-side & serverless integrations. See the guides linked below for each variation.

Before You Start

The Web Tracking API requires a web activity to be setup with the fulfilment option set to Tracking. Before setting up integration you will need to get a webToken to start making calls to the web tracking endpoints. To help with this setup please follow the steps below:

Setup Web Activity & Get webToken

  1. Create a Web activity on a pathway and set the fulfilment option to Tracking

  2. Publish the pathway to an app

  3. Sign onto the app and start the pathway

  4. Open the web activity then select the open button. This will create a URL with a webToken URL parameter.

Setup API

When creating a pathway an API account is automatically created. You can use this API account or create a new one.

  1. Check settings. Check your API account settings and make sure Webtracking is set to allow.

  2. Check Restrict domain / IP. While testing you may want to leave this blank, this will allow you to make calls from API tools such as postman.

  3. Download your API token.

The Web Tracking API has two approaches you can use depending on your use case. To learning more approaches see Server-Side platforms Push Data.

ServerlessServer-Side PlatformsUser Privacy

Last updated