Logo Help Portal
  • Démarrer

    Introduction

    • Onboarding overview
    • Initiation de projet
    • Email compliance
    • Gestion de Compte

    Données

    • Echange de données
    • Adaptation de données
    • Web data collection

    Channels

    • Email onboarding
    • Smart Insight
    • Predict
  • Formation
    • Online Self Learning
    • Vidéos d'intégration
    • Instructor Led Training
    • Webinaires
    • Séminaires
  • Guides d'utilisation

    Stratégie

    • Personnalisation
    • Automatisation
    • Data Monitoring

    Channels

    • Email
    • Application mobile
    • Web
    • Ads

    Add-ons

    • Smart Insight
    • Predict
    • Recommandations d'incitations
    • AIM
  • Articles de support technique

    Nouveautés

    • Quoi de neuf sur la Plateforme Emarsys ?
    • Fonctionnalités pilotes
    • Articles sur la RGPD et la Protection des Données
    • Release notes - archive

    Support

    • L'aide et le support chez Emarsys
    • Gérer votre profil d'utilisateur
  • |
  • Dévelopeurs
  • Etat du système
Besoin d’aide? Envoyer une demande
Français Deutsch English Español Русский Türkçe 简体中文
Connexion
  • Documentation_-TechRef_- Enhance Add-ons
  • Emarsys Integration Platform
  • 0 Documentation_-TechRef_- Enhance Add-ons Emarsys Integration Platform

Dans cette section :

  • The Enhance Marketplace
  • Add-ons - Overview
  • Integration How-to
  • Emarsys Partner API
  • Emarsys UI Framework
  • Integrating iframes for Single Sign-on
  • Containers
  • Javascript Events
  • Server-side Events
  • Integrating Automation Center Nodes
  • Afficher plus

in Emarsys42

    Expand all

    Javascript Events

    Updated: 16 janvier 2018 18:52

    Toutes nos excuses, cette page n'a pas encore été traduite. L'équipe Localization d' Emarsys est en train d'y remédier et souhaite vous proposer toute la documentation en Français!

    For some use cases, a Single Sign-on iframe or a Containers iframe should communicate with the Emarsys application. We are using window.postMessage() to implement this communication. Our code that receives your integration’s messages is open source and available on GitHub at emartech/suite-integration-js.

    It’s possible that there will be more than one integration iframes will be loaded on a page. The iframes of Single Sign-on and Containers will receive an integration_instance_id GET parameter in the iframe URL. They can use this ID to identify themselves.

    Resize message

    Containers may have different heights based on the content they have, and this can change dynamically if the content changes. On the load of the content and content changes, the integration should send a resize message with the new height of the content.

    var integration_instance_id = document.location.href.match(/integration_instance_id=(d+)/)[1];
    window.postMessage({
      "event": "resize",
      "source": { "integration_instance_id": integration_instance_id },
      "height": 200 /* pixel */
    }, "*");

    Refresh message

    This message simply reloads the current page.

    var integration_instance_id = document.location.href.match(/integration_instance_id=(d+)/)[1];
    window.postMessage({
      "event": "refresh",
      "source": { "integration_instance_id": integration_instance_id }
    }, "*");

    Alert message

    The integration can send an alert event to the Emarsys application, and it will display a banner alert at the top of the page. The text of the alert message is required, and optionally you can specify an icon, a CSS classname and a timeout as well. Please refer to the Emarsys UI Framework for more information about the available icons and alert classes.

    var integration_instance_id = document.location.href.match(/integration_instance_id=(d+)/)[1];
    window.postMessage({
      "event": "alert",
      "source": { "integration_instance_id": integration_instance_id },
      "icon": "e-communication-network",
      "text": "Hello World!",
      "className": "e-alert-success"
    }, "*");

    Navigate message

    The integration can ask the Emarsys application to navigate to an other page. Please consult Emarsys Support about the available page IDs.

    var integration_instance_id = document.location.href.match(/integration_instance_id=(d+)/)[1];
    window.postMessage({
      "event": "navigate",
      "source": { "integration_instance_id": integration_instance_id },
      "target": {
        "pathname": "email_campaigns/edit",
        "campaign_id": 123456
      }
    }, "*");
    Cet article vous a-t-il été utile ?

    Vous avez d’autres questions ? Envoyer une demande
    Retour en haut

    You may also be interested in:

    Articles associés

    • Server-side Events
    • Data Collection JavaScript API Reference
    • Emarsys Partner API
    • Salesforce CRM Integration Manual
    • Implémenter les scripts de Collecte de données Web Extend
    Copyright © 2019 Emarsys eMarketing Systems. All rights reserved
    Legal Notice Privacy Policy Master Services Agreement Anti-spam Policy
    test new search