Use the Skeepers deployment tag to integrate interactive surveys into your websites (in the form of pop-ins, pop-unders, buttons, etc.).
Generated by default, this JavaScript tag can be customized to best meet your needs and GDPR limitations. In this article, we present the steps necessary to access these tags on the platform and how to integrate them into your websites/tag managers.
What is a deployment tag ?
If you wish to set up surveys to be displayed on your websites, it is necessary to opt for Web, InPage, or Button type deployments.
The deployment tag allows you to properly trigger and display these types of surveys on your website according to the rules you have previously defined in your deployments.
This JavaScript tag also enables you to capture information about visitor behavior that is necessary to evaluate the display conditions of your surveys (visited pages, time spent, visitor information, etc.).
Its purpose is to trigger your surveys at the most opportune moments during a visit to your website.
Where can I find the deployment tag ?
You will find your deployment tag by navigating to the "Settings" tab in the left sidebar of the platform. In the "Deployments" section within your settings, select "Deployment tag".
Ensure that you have created your domains before configuring your deployments tags. Otherwise, you will not be able to do so.
The Skeepers JavaScript tag controls the display of surveys according to the rules you have defined in your web deployments and captures information about visitor behavior (visited pages, time spent, visitor information, etc.), necessary for evaluating survey display conditions.
We recommend involving a developer from your technical team for code integration.
It is recommended to use a tag management tool (such as Google Tag Manager or Tealium) to setup the tag.
Deployment tag set up
Integrating the tag on a standard website (MPA)
Insert the code, available in your account settings, on all pages of the website corresponding to the domain name associated with the tag. This code should be positioned just before the closing of "body" tag.
During integration, values marked as "undefined" should be dynamically populated using the site's variable system or dataLayer for each defined variable.
On each page, a JavaScript resource is asynchronously loaded. Once this resource is loaded, the trigger rules are automatically evaluated and applied.
Tag Integration on a Single Page Application (SPA) website
Insert the code, available in your account settings, on the main page of the application corresponding to the domain name associated with the tag. This code should be placed just before the closing of "body" tag.
During integration, values marked as "undefined" should be dynamically populated via the site's variable system or the dataLayer for each defined variable.
When the application loads, a JavaScript resource is asynchronously loaded. Once this resource is downloaded, the trigger rules are automatically evaluated.
To allow trigger rule evaluation during screen or context changes, it is necessary to update the "_Mfb_ud" variable properties and trigger the evaluation by calling a JavaScript function provided by the tag.
Updating the "_Mfb_ud" variable
Evaluating trigger rules
Understanding the tag’s content
To learn more, here is an example of a trigger tag (for informational purposes only, do not use this on your site) :
Site variables and attributes
window._Mfb_ud = {
var1 : undefined,
var2 : undefined,
varN : undefined,
Upon code integration, properties ("var1", "var2", etc., in the example) defined as “undefined” at the first level of the "_Mfb_ud" object should be dynamically populated via the site's variable system or the dataLayer.
These properties will define the survey display rules and are linked to respondent answers if they are declared as attributes within the solution.
The name of the variables is defined during integration and must match the system name declared in the solution if it is an attribute.
This data can be used in the trigger conditions "Attribute" or "Website variable" within your deployments.
Language management
lang : undefined, // You can force the language of the survey.
This block allows you to manage translations when your campaign is translated into multiple languages (more information on campaign translations here). If this block's content is left as "undefined", the language used will be the one handled as a priority according to your deployment settings. We detail the language priority order in this article : Manage the display language of surveys and shared items.
If you want to manage the language via the deployment tag, replace the placeholder "undefined" with the language code in the ISO 639-1 format (for example, "nl"), and add the country code in the ISO 3166-1 format if needed (for example, "nl-BE").
Managing browsing history
_page : {
url : location.pathname,
storageDuration : 30
// remove this if not used
pageProperties : {
property1 : undefined,
property2 : undefined
}
}
This block configures the collection of visitors' browsing history, on which trigger rules can rely.
- "url" : Refers to the URL of visited pages. By default, the tag uses the standard JavaScript function to assign this property. It can be assigned using a specific variable from your dataLayer if your page management is specific.
- "storageDuration" : Defines the duration for storing the browsing history, expressed in days. The accepted value is between 0 and 30, with 30 being the maximum.
- "pageProperties" : Allows adding specific properties to each page, which will also be stored in the history. These properties can be used in trigger rules based on browsing history. This object can be removed if not used.
If you set the "storageDuration" parameter to 0, no history will be stored in this key, which is suitable when no triggers are configured based on browsing history (previous visits).
This data can be used in trigger conditions such as "Number of visits", "Visited page", or when browsing history is considered within your deployments.
Sharing information between 2 subdomains
window._Mfb_useCookie : true;
By default, the deployment tag uses a cookie to share certain information, which trigger conditions rely on, between subdomains of the same website.
If your website is limited to a single subdomain, this cookie is not necessary. You can disable its use by setting this parameter to "false".
window._Mfb_useCookie : false;
Privacy Mode
privacyMode : false
This parameter adjusts the behavior of the trackers used by the tag, taking into account the user's consent preferences regarding the use of cookies. We detail the trackers in the following article : What cookies are placed by Skeepers ?
When “privacyMode” is activated, the data stored by the trackers will not be accessible during the user's subsequent visits to the site, except for essential technical information necessary for the proper functioning of the system (notably for managing solicitation).
The “privacyMode” parameter is disabled by default.
To activate it, you can set this parameter to “true”.
privacyMode : true
When the privacyMode parameter is activated, the browsing history is no longer retained (StorageDuration: 0), and information sharing between subdomains is disabled (window._Mfb_useCookie: false).
As a result, trigger conditions based on browsing history (such as "Visited page in browsing history" or "Number of visits in the last N days") will not trigger any surveys.
If your survey integrated into your website is not displaying correctly, we invite you to consult our documentation on this subject.
If you want to learn more about cookie management by the Skeepers deployment tag, check our dedicated article.