Skip to content
sokolov-mv edited this page Sep 23, 2024 · 11 revisions

Invitation Manager Publishing Guide

Principal Publisher – Service Canada

Version en français

Overview

This publishing guide outlines the step-by-step process on how to publish pop-up invitations on your departments' website.

If you haven't installed the GC invitation manager tool, submit a request to have the Invitation Manager installed on your website.

Publishing a pop-up invitation

By opening the "im.json" file, you will be able to create, update, or delete pop-up invitations for your website. This will require the ability to read and write basic html.

Creating a pop-up

To create a new pop-up, you will need to add a new item to the "surveys" array in the "im.json" file.

Example:

"surveys" : [{
    "id" : "1",
    "title-en" : "English Title",
    "title-fr" : "Titre Francais",
    "body-en" : "<p>English Description.</p><p class='mrgn-bttm-0'>",
    "body-fr" : "<p>Description en Francais.</p><p class='mrgn-bttm-0'>",
    "link-en" : "https://survey1_link_en",
    "link-fr" : "https://survey1_link_fr",
    "start-on" : "YYYY-MM-DDTHH:mm:ss",
    "end-on" : "YYYY-MM-DDTHH:mm:ss",
    "type" : "Entire site",
    "probability" : Value_less_than_one,
    "yes-en" : "<strong>Yes, <span class='wb-inv'>I will take the exit survey </span>after my visit.</strong>",
    "yes-fr" : "<strong>Oui, <span class='wb-inv'>je vais participer au sondage de départ </span>après ma visite.</strong>",
    "no-en" : "No, <span class='wb-inv'>I do not want to take the exit survey, </span>thank you.",
    "no-fr" : "Non, <span class='wb-inv'>je ne veux pas participer au sondage de départ, </span>merci.",
    "close-en" : "Close: Exit survey (escape key)",
    "close-fr" : "Fermer : Sondage de fin de visite (touche d&apos;échappement)",
    "name" : "Survey_Name",
    "survey-urls" : [
      {"site" : "^site_domain.com"}
    ]
  },
  {
    "id" : "2",
    "title-en" : "English Title",
    "title-fr" : "Titre Francais",
    "body-en" : "<p>Description part 1<strong>Something to emphasize</strong>Remainder of Description Part 1.</p><p class='mrgn-bttm-0'>Description Part 2. </p>",
    "body-fr" : "<p>Partie 1 de la Description <strong>Quelque chose a souligner</strong>Reste de la Description Partie 1</p><p class='mrgn-bttm-0'>Partie 2 de la Description.</p>",
    "link-en" : "http://www1.canada.ca/en/contact/sc_account.html?referrer=logout",
    "link-fr" : "http://www1.canada.ca/fr/contact/mon_dossier_sc.html?referrer=logout",
    "start-on" : "YYYY-MM-DDTHH:mm:ss",
    "end-on" : "YYYY-MM-DDTHH:mm:ss",
    "type" : "Page",
    "probability" : Value_less_than_one,
    "yes-en" : "<strong>Yes,  <span class='wb-inv'>I will take the exit survey </span> after my visit.</strong>",
    "yes-fr" : "<strong>Oui, <span class='wb-inv'>je vais participer au sondage de départ </span> après ma visite.</strong>",
    "no-en" : "No, <span class='wb-inv'>I do not want to take the exit survey, </span> thank you.",
    "no-fr" : "Non, <span class='wb-inv'>je ne veux pas participer au sondage de départ, </span> merci.",
    "close-en" : "Close: Exit survey (escape key)",
    "close-fr" : "Fermer : Sondage de fin de visite (touche d&apos;échappement)",
    "name" : "Survey_Name",
    "survey-urls" : [
      { "url" : "https://domain_example/example-eng.html"},
	  { "url" : "https://domain_example/example-fra.html"}
    ]
  }
  ] 

When creating your first pop-up, we recommend that you use the existing items in the "im.json" file as a working example. This can then be copy and pasted when creating additional pop-ups as a template for your website(s).

Each pop-up item will contain the following data parameters in the "surveys" array identifying specific details for that pop-up. Each parameter will require a value. Once complete be sure to save the "im.json" file:

Parameter Description
"id" A unique ID # given to each survey. It is recommended that the #'s be sequential. Example "1", "2", "3", "4" etc.
"title-en" The English title of the invitation popup that will be displayed on the popup for English pages. Example: "GC Survey Study" Image showing a Survey popup title example
"title-fr" The French title of the invitation popup that will be displayed on the popup for French pages. Example: "Étude d'enquête GC"
"body-en" The English text in the main body that will be displayed on the invitation popup written in html format. Example: <p>Please take a few moments to let us know about your experience. </p><p class="mrgn-bttm-0"> Your participation is voluntary and your responses are confidential and anonymous. </p> Image showing a Survey popup English body text example
"body-fr" The French text in the main body that will be displayed on the invitation popup written in html format. Example: <p> Veuillez prendre quelques minutes pour partager votre expérience.</p><p class="mrgn-bttm-0">Votre participation est volontaire, et vos réponses sont confidentielles et anonymes.</p>
"link-en" The destination link to the English survey for when the visitor selects the "yes" button. Example: " http://www.mytestsurvey/en.html?queryparameter " Image showing a survey popup destination-link example for the Yes button
"link-fr" The destination link to the English survey for when the visitor selects the "yes" button. Example: "http://www.mytestsurvey/fr.html?queryparameter"
"start-on" The start date the popup invitation will begin to appear for visitors to your site (yyyy-mm-dd_T_hh:mm:ss). Example: "2020-09-17T00:00:00"
"end-on" The end date the popup invitation will stop appearing for visitors to your site (yyyy-mm-dd_T_hh:mm:ss). Example: "2021-09-17T00:00:00"
"type" Identifies the specific scope of where the invitation popup of the survey can appear:
  • " Entire site" meaning the popup invitation can appear on any page on your site.
  • " Page" meaning the popup invitation can only appear on specific pages of your site.
"probability" The probability (as an integer) a visitor has the opportunity to view the popup invitation in its scope type.

This means that the sum of all popup invitations of the same scope type (i.e. "Entire site" or "Page") cannot exceed 1.

"yes-en" The English content of the "Yes" button displayed on the popup invitation in html format. Example: " <strong>Yes, <span class='wb-inv'>I will take the exit survey </span> after my visit.</strong> " Image showing the text for a Survey popup 'Yes' button
"yes-fr" The French content of the "Yes" button displayed on the popup invitation in html format. Example: " <strong>Oui, <span class='wb-inv'>je vais participer au sondage de départ </span> après ma visite.</strong>""<strong>Yes, <span class='wb-inv'>I will take the exit survey </span> after my visit.</strong> "
"no-en" The English content of the "No" button displayed on the popup invitation in html format.

Example: " No, <span class='wb-inv'>I do not want to take the exit survey, </span> thank you. "Image showing a the text for a Survey popup 'No' button

"no-fr" The French content of the "No" button displayed on the popup invitation in html format.

Example: " Non, <span class="wb-inv">je ne veux pas participer au sondage de départ, </span> merci."

"close-en" The English text of the close icon or escape key. This is required for accessibility.

Example: "Close (escape key)"

"close-fr" The French text of the close icon or escape key. This is required for accessibility.

Example: "Fermer (touche d'échappement)"

"name" The unique name identifying the survey study for the invitation popup (i.e. Dept. abbreviation – Survey name – Launch Date).

Example: "ServCan - Exit Survey - 20200917"

"survey-urls" The specific URL's in which the popup invitation can appear on. This will either be:

  • An array of "site" if the survey scope is "Entire Site"
    • Contains the URL hostname of the site
    • Formatted without the https protocol or www subdomain
    • Sites using the canada.ca domain (e.g. example.canada.ca) should be inputted as "canada.ca"

Example for www.exampledomain.com site

    "survey-urls" : [
{"site" : "^exampledomain.com"}
]

Example for sites using the canada.ca domain (e.g.www.example.canada.ca) site

    "survey-urls" : [
{"site" : "canada.ca"}
]

Example for www.example.gc.ca site

    "survey-urls" : [
{"site" : "^example.gc.ca"}
]
  • An array of "url" if the survey scope is "Page"
    • Contains the individual page URL(s)
    • Formatted as the "[entire page URL]" including the https protocol and all subdomains for specific pages OR as the "[base URL]/[directory folder]" including the https protocol and all subdomains for pages contained in a URL folder
Example of specific pages:

Example for www.exampledomain.com pages

    "survey-urls" : [
{"url" : "https://www.exampledomain.com/en/url-1.html"}
{"url" : "https://www.exampledomain.com/en/url-2.html"}
{"url" : "https://www.exampledomain.com/fr/url-1.html"}
{"url" : "https://www.exampledomain.com/fr/url-2.html"}
]

Example for example.canada.ca pages

    "survey-urls" : [
{"url" : "https://example.canada.ca/en/url-1.html"}
{"url" : "https://example.canada.ca/en/url-2.html"}
{"url" : "https://example.canada.ca/fr/url-1.html"}
{"url" : "https://example.canada.ca/fr/url-2.html"}
]

Example for example.gc.ca pages

    "survey-urls" : [
{"url" : "https://example.gc.ca/en/url-1.html"}
{"url" : "https://example.gc.ca/en/url-2.html"}
{"url" : "https://example.gc.ca/fr/url-1.html"}
{"url" : "https://example.gc.ca/fr/url-2.html"}
]

Example of pages contained in a URL folder(s):

Example for www.exampledomain.com pages contained in URL folder (e.g. /folder1/)

    "survey-urls" : [
{"url" : "https://www.exampledomain.com/en/folder1/"}
{"url" : "https://www.exampledomain.com/fr/folder1/"}
]

Example for example.canada.ca pages contained in URL folder (e.g. /folder1/)

    "survey-urls" : [
{"url" : "https://example.canada.ca/en/folder1/"}
{"url" : "https://example.canada.ca/fr/folder1/"}
]

Example for example.gc.ca pages contained in URL folder (e.g. /folder1/)

    "survey-urls" : [
{"url" : "https://example.gc.ca/en/folder1/"}
{"url" : "https://example.gc.ca/fr/folder1/"}
]

Updating a pop-up

At any point, you can freely update any parameter value within the "surveys" array of the "im.json" file.

Removing a pop-up

To remove an invite permanently from your server, you have just to delete the corresponding item in the "surveys" array of the im.json file.

Alternatively, you can also temporarily disable a popup by modifying the "start-on" and "end-on" parameter date values.

Testing a pop-up invitation

Now that you have successfully installed the invitation manager on your website and updated the html on your web page(s) you will be able to test the pop-up.

Browser Testing

  1. Within the navigation bar of your browser type in the URL address of your website or webpage.
  2. Add the query string: ?logim=1&im_scope=####&im_surveyid=##&im_nocookiecheck=1&im_nodatecheck=1 to the end of the URL and adjust the following parameters to target your pop-up invitation.
  3. Refresh the page until you see your pop-up appear. Note: If you encounter issues, try clearing your cache or using a private/incognito tab. This is normal and due to the probability parameters within the pop-up tool.

If you have an Adobe Analytics account, you can report on the number of visitors who saw the invite and how many clicked “Yes” using specific dimensions and metrics that we provide in Adobe Analytics. For details, refer to our User Guide: Adobe Analytics User Guide - Pop-up Invitation Reports.

Note: You can still report on your pop-up in Adobe Analytics even if the page does not have Adobe Analytics installed. If you are interested in learning about Adobe Analytics, visit our Adobe Analytics GCXchange page.

Parameter Value
im_scope

The specific scope type you would like to test:

  • site : targeting all "Entire Site" scope pop-up invitations
  • page : targeting all "Page" scope pop-up invitations
    im_surveyid The unique ID # assigned in the "im.json" file of the pop-up invitation you would like to target for testing.

    Example:

    www.exampledomain.com?logim=1&im_scope=site&im_surveyid=1&im_nocookiecheck=1&im_nodatecheck=1
    www.exampledomain.com/en.html?logim=1&im_scope=page&im_surveyid=4&im_nocookiecheck=1&im_nodatecheck=1
    

    Appendix

    How does the Invitation Manager work?

    Once properly installed on your web server, the GC Invitation Manager script will run in the background of your GC web site, and is triggered once a visitor enters the GC website. Upon entry, the visitor is assessed against specific criteria to determine whether the visitor qualifies for a popup invitation.

    The GC Invitation Manager criteria are based on executable steps. If at any of these steps a visitor is not qualified, the remainder of the steps will not execute and the visitor will automatically not qualify for an invitation popup:

    Step 1 : JavaScript is enabled on the visitor's web browser and cookies are allowed.

    Step 2 : The Visitor has not seen an invitation popup during the set designated period within the "duration-delay" parameter. (Example: the last 15 days)

    Step 3 : A random number is generated for the user to assign the scope (Page level or Site wide level) to display.

    Step 4 : Does the specific web page visited qualify for any active survey studies based on date the web page was viewed? ( "start-on" and "end-on" parameters)

    Step 5 : Is the visited page included in the Whitelist of GC pages and not included in the Blacklist of GC pages?

    Step 6 : The probability of the GC page/site invitation popups are calculated.

    Step 7 : A random number is generated to qualify the visitor for the invitation popup in relation to the calculated probability.

    Step 8 : Display invitation popup.

    These steps are illustrated in more detail in the following Invitation Manager Flow Charts provided at the end of the document.

    If the visitor qualifies, an invitation popup will appear in the browser prompting the visitor to accept or decline participating in the survey. Additionally, a time stamp is recorded within local storage to identify that the visitor has seen a popup.

    If the visitor does not qualify, nothing will happen and the visitor will receive no invitation popup from the invitation manager.

    Glossary

    GC Invitation Manager

    Software installed on your server(s) designed to trigger and manage invitation popups across your GC web site.

    GC Invitation Popup

    A customizable popup window that will appear on designated pages within your GC web site prompting the visitor to complete a survey study.

    Image highlighting all the different components that comprise a Invitation Manager Popup

    An invitation popup will always contain the following information:

    1. The title of the website survey study you wish for visitors to participate in
    2. A small description of the survey study
    3. A clickable "Yes" button for visitors accepting to participate in the survey study
    4. A clickable "No" button for visitors declining to participate in the survey study

    Invitation Manager Flow Charts

    Flow chart depicting the steps of how a Invitation Manager popup is generated

    Define a scope Hat – Sub chart 1.1

    P = Page scope probability (ex. 0.7)

    S = Site scope probability (ex. 0.3)

    R = Random number between 0 and 1

    Invitation Manager Scope hat

    Delete all surveys from DB that are outside working dates – Sub flowchart 1.2

    C = Current DateTime

    Invitation Manager Survey delete flow chart

    Random Number (display or not) – Sub flowchart 1.3

    R = Random number between 0 and 1

    S = surveyDB size

    i =0

    Sum = 0

    Invitation Manager Survey random number flow chart