Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
styledisc
typelist
printablefalse
Finding the widget

Trouver le code Widget

Info

SourcesSurveys Enquêtes Share Partager → Widget

Select the button click to copy to select the widget codeSélectionner le bouton cliquer pour copier pour copier le code widget.

You have the option to customize the widget's design and basic operations on this page.

The widget code has two parts: 

1) Widget element, use this wherever you prefer, it does not matter. 

2) Feedier API <script> tag to get the widget working. Add this to the end of your markup or right after the </body> tag.

Click the button 'Save and Preview' to view your changes and Preview the widget.

Adding Context Attributes to the Widget

You'll want to attach metadata that you collect on your website/application in order to give better context to the feedback you collect. Some examples may be:

Company department

User Role

Management level

By adding attributes, when your user leaves feedback, their metadata is automatically attached to their feedback, allowing you to analyse this on the platform and build cohorts and develop trends.

Here’s how adding an attribute may look:
Standard widget code

Vous avez la possibilité de personnaliser le design du widget ainsi que ses opérations de base sur cette page.

Le code widget se compose de deux parties : 

  1. Élément de widget, utilisez-le où vous préférez, cela n'a pas d'importance.

  2. Balise <script> de l'API Feedier pour faire fonctionner le widget. Ajoutez ceci à la fin de votre balisage ou juste après la balise </body>.

Cliquez sur le bouton 'Enregistrer et Prévisualiser' pour voir vos modifications et prévisualiser le widget.

Ajout d'attributs de contexte au widget

Vous souhaiterez attacher des métadonnées que vous collectez sur votre site web/application afin de fournir un meilleur contexte aux retours que vous recueillez. Quelques exemples pourraient être :

Service de l'entreprise

Rôle de l'utilisateur

Niveau de direction

En ajoutant des attributs, lorsque votre utilisateur laisse un feedback, leurs métadonnées sont automatiquement attachées à leur feedback, vous permettant d'analyser cela sur la plateforme, de créer des cohortes et de développer des tendances.

Voici à quoi pourrait ressembler l'ajout d'un attribut : Code de widget standard :

<script id="feedier-widget-script" src="https://feedier.com/js/widgets/v2/widgets.js?form-id=13&public-key=cb6c6eb920a84638d90e557d988193f8&no_header=true" type="text/javascript" async></script>

Widget code with context attributes 'user IDCode du widget avec les attributs de contexte 'Identifiant de l'utilisateur', 'RoleRôle', 'Signed up' added.Inscrit' ajoutés :

<script id="feedier-widget-script" src="https://feedier.com/js/widgets/v2/widgets.js?form-id=13&public-key=cb6c6eb920a84638d90e557d988193f8&no_header=true&user_id=1234&role=Premium&signed_up=14.02.21" async></script>

Testing the widget


Test du Widget

Info

Open your Ouvrez votre console (CTRL/CMD + SHIFT + I) → Application → Stockage (ou Storage) Stockage local (ou Local Storage) → Feedier.widget → Delete widget cookies

In order to make sure the widget is running the way you’d like, you’ll need to clear the cookies to retest on your webpage.

Image Removed

Advanced Settings

Manage the widget using JavaScript API  

Object

Supprimez les cookies du widget.

Afin de vous assurer que le widget fonctionne comme vous le souhaitez, vous devrez effacer les cookies pour effectuer un nouveau test sur votre page web.

Image Added

Paramètres avancés

Gérez le widget à l'aide de l'API JavaScript  

Objet: FeedierWidget

.toggle();

Code Block
FeedierWidget.toggle();

This method opens or closes the feedback widget’s content depending on the current status. It either shows the form or closes itCette méthode ouvre ou ferme le contenu du widget de feedback en fonction de l'état actuel. Elle affiche soit le formulaire, soit le ferme.

.init(options);

Code Block
FeedierWidget.init({
    form_id: 123,
    attributes: {
        department: marketing
    },
    forced: true
});

This method initializes the widget based on the options object.

option's name

Cette méthode initialise le widget en fonction de l'objet d'options fourni.

Nom de l’option

type

description

form_id

int

Identifiant de l'enquête Feedier survey ID. It can be found in the API or on survey-> options-> form management. Il peut être trouvé dans l'API ou dans Enquête -> Options -> Gestion du formulaire.

attributes

objectAttributes

to be attached to the feedback on Feedier. Attributes are contextual data coming from the client-side.  Attributs à attacher au feedback sur Feedier. Les attributs sont des données contextuelles provenant du côté client.

forced

booleanIf

set to Si défini sur true, the widget will be displayed even if the user already replied to the survey before.

Example of adding attributes through Javascript:

Attributes are customizable for your own context. It is possible to attach any kind of data from the client-side using

le widget sera affiché même si l'utilisateur a déjà répondu au sondage précédemment.

Exemple d'ajout d'attributs via JavaScript :

Les attributs sont personnalisables selon votre propre contexte. Il est possible d'attacher tout type de données du côté client en utilisant JavaScript (ES6/Jquery/Vue/ReachReact).  The attributes are used in Feedier to bring context and for reportingLes attributs sont utilisés dans Feedier pour apporter du contexte et pour les rapports.

Code Block
FeedierWidget.init({
    form_id: 123,
    attributes: {
        browser: navigator.userAgent, // Attach the client's browser
        screen_width: window.innerWidth, // Attach the client's browser width 
        page: window.location, // Attach the client's URL
        user_id: $('#user-id').val() // Attach the user ID using Jquery if set in the DOM with ID user-id   
    },
});

When selecting attribute data, try to select datasets that help you measure your KPIs.

JavaScript Events 

When the widget is displayed on the page, the Feedier widget script will fire a

Lors de la sélection des données attributaires, essayez de choisir des ensembles de données qui vous aident à mesurer vos indicateurs de performance clés (KPI).

Événement JavaScript 

Lorsque le widget est affiché sur la page, le script du widget Feedier déclenchera un événement 'FeedierWidget.built' event. It can be used automatically to open the widget or do other actions on the frontend. . Il peut être utilisé automatiquement pour ouvrir le widget ou effectuer d'autres actions côté frontend.

Code Block
document.addEventListener('FeedierWidget.built', function(e) {
      FeedierWidget.toggle();
});

JavaScript

Example: Display the Feedier widget on a custom button click through Javascript

Exemple : Afficher le widget Feedier lors d'un clic sur un bouton personnalisé à l'aide de JavaScript.

Add in the Custom JavaScript Loaded option
Info

SourcesSurveys Enquêtes Share Partager → Widget → Visibility

  • Toggle off the Show on Init option

  • Visibilité

    • Désactivez l’option “Afficher à l’initialisation”

    • Ajoutez dans l’option “JavaScript personnalisé chargé” : FeedierWidget.toggle()

    In the Dans le DOM:

    Code Block
    <a href="#" id="feedback-start" class="btn btn-primary">
          Feedback
    </a>

    HTML

    JS example to trigger the button with Exemple JavaScript pour déclencher le bouton avec jQuery : 

    Code Block
    <script id="feedier-widget-script" src="https://feedier.com/js/widgets/v2/widgets.min.js?form-id=770&public-key={PUBLIC_KEY}&no_header=true" type="text/javascript" async></script>
    
    <script type="text/javascript">
            $(document).ready(function() {
                  $('#feedback-start').on('click', function () {
                         FeedierWidget.init({ form_id: 770, forced: true });
                  });
           });
    </script>

    JavaScript

    Example

    Exemple :

    Close the widget after feedback is completed

    Fermer le widget après la fin du feedback

    Code Block
     window.addEventListener('message', function(event) {
         if (event.data.eventName === 'feedback_completed') { $('.feedier-widget').hide() };
    });

    JavaScript

    Changing the Widget style using CSS

    There are two kinds of CSS changes: 

    CSS Inside the form

    Changer le style du widget en utilisant le CSS

    Il existe deux types de modifications CSS :

    CSS à l'intérieur du formulaire :

    Info

    Survey Enquête Branding Marque → Custom CSS

    More info on CSS examplesPlus d'informations sur des exemples CSS.

    CSS on the sur le widget: 

    Info

    Survey Enquête Share→ Partage→ Widget → Design

    CSS can be added to your application OR under the Design section of the widget pageLe CSS peut être ajouté à votre application OU dans la section Design de la page du widget.

    CSS classes can be explored through the inspector, most notables ones are: 

    Les classes CSS peuvent être explorées via l'inspecteur, les plus remarquables étant

    CSS class

    Description

    .feedier-widget__caller

    Widget feedback button

    .feedier-widget__popup

    Widget iframe wrapper 

    Example of adding CSS to the widget

    The following example will set the widget button color to red, change its font and remove border across the survey

    Exemple d'ajout de CSS au widget :

    L'exemple suivant définira la couleur du bouton du widget en rouge, changera sa police et supprimera la bordure autour du sondage :

    Code Block
    .feedier-widget__caller {
           background: #ce0707;
           color: #FFF;
           border: 0;
           font-family: Arial;
    }
    
    .feedier-widget__popup {
         padding: 0;
    }

    CSS

     

    Showing the widget at specific events using

    Affichage du widget à des événements spécifiques en utilisant Google Tag Manager

    There are a number of advantages of using a Tag manager, including: No developer time needed, proactive feedback using triggered events, and attaching attributes easily

    Create a new tag in Google Tag Manager

    Il existe plusieurs avantages à utiliser un gestionnaire de balises, notamment : aucune nécessité de temps de développement, la possibilité de fournir des retours proactifs en utilisant des événements déclenchés, et une facilité d'ajout d'attributs.

    Créez une nouvelle balise dans Google Tag Manager.

    Info

    Tag Manager → Add a new tag → Tag configuration → Paste Feedier widget code

    Make sure to publish a new version of GTM when you make changes in your configuration (eg. you change the triggering method

    Coller le code Widget Feedier

    Assurez-vous de publier une nouvelle version de GTM lorsque vous apportez des modifications à votre configuration (par exemple, lorsque vous modifiez la méthode de déclenchement).

    Then, add an explicit Tag name like “Feedback Widget Feedier” and click the Tag Configuration icon:

    Using the Custom HTML under tag configuration, you can attach attributes En utilisant le HTML personnalisé sous la configuration de la balise, vous pouvez attacher des attributs via GTM. GTM will automatically replace the variables defined using their data layer. Eg. remplacera automatiquement les variables définies à l'aide de leur couche de données. Par exemple, role={{user.role}}&plan={{user.plan}} becomes devient role=directordirecteur&plan=enterpriseentreprise.

    Trigger GTM based on an event

    In the Tag Configuration Settings, click “Triggering“. Then click the + icon to configure when to trigger the widget.

    Image Removed

    Some examples of times you might like to trigger the widget:

    • Ask for feedback after signing up

    • Ask for feedback after 5th visit

    • Ask for feedback before leaving the app

    • Ask for feedback after achieving a product goal (ordering, booking, creating, updating…)

    • Ask for feedback after a user hasn’t followed an expected flow.

    Make sure that jQuery is loaded on the page. It's a common error. If your widget isn't loading, and you have no idea why, you can easily figue out if jQuery is the culprit. Open the console (right click on the page > "Inspect the page"). You will see the error that jQuery isn't loaded. 

    Déclenchez GTM en fonction d'un événement

    Dans les paramètres de configuration de la balise, cliquez sur “Triggering”. Ensuite, cliquez sur l'icône + pour configurer quand déclencher le widget.

    Image Added

    Quelques exemples de moments où vous pourriez souhaiter déclencher le widget :

    • Demander un feedback après l'inscription

    • Demander un feedback après la 5e visite

    • Demander un feedback avant de quitter l'application

    • Demander un feedback après avoir atteint un objectif produit (commande, réservation, création, mise à jour…)

    • Demander un feedback après qu'un utilisateur n'a pas suivi un flux attendu.

    Assurez-vous que jQuery est chargé sur la page. C'est une erreur courante. Si votre widget ne se charge pas et que vous ne savez pas pourquoi, vous pouvez facilement déterminer si jQuery est en cause. Ouvrez la console (clic droit sur la page > "Inspecter la page"). Vous verrez l'erreur indiquant que jQuery n'est pas chargé.