SkyGlue Visitor Tracking API

SkyGlue lets you explicitly push an userID to Google Analytics in order to identify the behavior of a specific visitor.

Step 1: Set up visitor tracking to use your backend user ID

SkyGlue automatically tracks visitors using two IDs:

(1) visitor ID (e.g.121029230245662). By default, this ID is generated based on the Google Analytics utma cookie value. If you set up cross-domain tracking in your Google Analytics, this ID will remain the same across domains. This ID is based on browser cookie. It will be different for different browsers or different machines. This ID can be found in the value of customVariable 5, event label and event actions in Google Analytics.

(2) registered user ID (e.g. B1E2DB3). If you set up registered user tracking in your SkyGlue portal, this ID is generated using the login/signup form value visitor submitted. It is a hash value of the user ID of the field value you specified in the SkyGlue portal. The ID will be the same for the same registered user even if he/she uses different browsers or machines. This ID can be found under event label in Google Analytics.

You can overwrite the value of both with your own back-end UserID using the following approach: (Please note, Google Analytics does not allow any PII data to be sent to its server.)

To overwrite visitor ID, define a global Javascript variable “_sg_visitorId” anywhere in your web page.

To overwrite registered ID, define a global Javascript variable “_sg_registeredUserId” anywhere in your web page. It should be a string without space.

The ID is set using server side language, such as php, asp, python, etc. Following is an example of PHP.

Step 2: View visitor activities using your back-end user ID

You can enter the visitor ID into the Registered ID search box on your SkyGlue user report to retrieve the visitor’s digital path.