Pulse Insights Documentation
  • Pulse Insights Overview
    • 👋Welcome to Pulse Insights
  • Implementing Pulse Insights (Dev)
    • Implementing on Web and Mobile Web
      • Deploying your tag (code snippet)
      • Ingesting contextual data for targeting and analysis
      • Client Key
      • Tracking Events (aka High Value Actions)
      • Presenting a specific survey
      • Supporting Inline surveys
      • Callbacks
      • Privacy Features
        • Identifiers, cookies, and local storage
        • Data that Pulse Insights stores
      • QA Process and Preview Mode
        • JavaScript Object
      • Single Page Apps
      • Load Time & Availability
      • Bot blocking
      • Customer-initiated Feedback
    • Implementing in email
      • Dynamic Email
    • Implementing in Native Apps
      • Android
        • Android Release Notes
        • Android Demo App
      • iOS
        • iOS Release Notes
        • iOS Demo App
      • Demo App Help
  • Integrations
    • Integrations overview
      • Hubspot
      • Braze
      • Google Analytics
      • Data Lake
  • Configuring Pulse Insights (Console)
    • Account Setup
      • Authentication & SSO
      • Inviting Collaborators
      • Roles & permissions
    • Dashboard & Program Management
      • Survey Status
    • Editor
      • Question Types
        • Survey Invitation
        • Single Choice
          • Using Images
        • Multiple Choice
        • Free Text
        • Net Promoter Score
        • Slider
        • Custom Content (Next Best Action)
        • Thank You Message
          • Poll (Show Results)
      • General
      • Targeting
        • Devices & Channels
        • Sample Rate
        • URL & Events
        • Dates
        • Previous Responses
        • On Page Behavior
        • CRM Targeting
        • Geo Targeting
        • Goal
        • User Behavior
        • Advanced Settings
      • Formatting
        • Widget Types
          • Docked
          • Bottom Bar
          • Top Bar
          • Overlay
          • Inline
        • Themes
        • Question Display
        • Custom CSS (Survey-level)
        • Supported Markdown
      • Link Builder
      • Preview
      • Survey Groups (Localization)
    • Reporting
      • Results Page & Filtering
      • On Demand
        • Columns/Data Dictionary
      • Scheduled Reports
      • Free Text
        • AI Generated Summary
        • Responses & Tagging
      • Custom Content Reporting
      • Viewable Impressions
    • Account Level Settings
      • Get Code Snippet
      • Global Targeting
      • Data & Integrations (Callbacks)
      • Data Restrictions
      • Themes
      • Automations
        • High Value Actions (Events)
      • Activity Log
      • Configured by Pulse Insights
  • Best Practices
    • Best Practices
      • Copy
      • Design and Execution
      • Targeting
      • Widget Types
      • Sample Rate
      • Submission Rates
      • Special Features
      • Best Practices for Progressive Profiling
  • API
    • API reference
      • Surveys
        • Questions
        • Poll
      • Q
        • A
      • Direct serve
      • Serve
      • Results
      • Present results
      • Track event
      • Custom content link click
      • Submissions
        • All answers
        • Answer
        • Close
        • Viewed at
      • Devices
        • Set data
Powered by GitBook
On this page
  • Example Tag
  • What the tag does
  • Finding your specific tag
  • Tag Deployment FAQs
  • Which pages should have the Pulse Insights code snippet?
  • Where on the page should we place the code snippet?
  • Can we use a tag manager to deploy Pulse Insights?
  • Does the Pulse Insights tag work with [X] CMS?
  • Do we use the same code snippet across secure/non-secure pages?‍
  • Do we use the same tag across multiple domains and subdomains?
  • Do we use the same tag across our development, staging, and production environments?

Was this helpful?

  1. Implementing Pulse Insights (Dev)
  2. Implementing on Web and Mobile Web

Deploying your tag (code snippet)

Pulse Insights is integrated into web-based environments with a JavaScript tag or code snippet that executes on page load.

Example Tag

<script>
(function() {
  var w = window, d = document;
  var s = d.createElement('script'); s.async = 1;
  s.src = '//js.pulseinsights.com/surveys.js';

  var f = d.getElementsByTagName('script')[0];
  f.parentNode.insertBefore(s, f);

  class PulseInsightsCommands extends Array{
    push(...commands) {
      commands.forEach((command) => window.PulseInsightsObject.processCommand(command));
    }
  }

  function waitPulseInsightsObject() {
    const timeoutPromise = new Promise((_, reject) => setTimeout(reject, 5000));
    const waitPromise = new Promise(function (resolve) {
      function wait() {
        if (typeof window.PulseInsightsObject == 'object') {
          resolve();
        } else {
          setTimeout(wait, 100);
        }
      }
      wait();
    });
    return Promise.race([timeoutPromise, waitPromise])
  }

  waitPulseInsightsObject().then(function () {
    w['pi']=function() {
      w['pi'].commands = w['pi'].commands || new PulseInsightsCommands;
      w['pi'].commands.push(arguments);
    };
    
    pi('host', 'survey.pulseinsights.com');
    pi('identify', 'PI-99999999); // This is an example value.
    pi('pushBeforeGet', true);
    pi('get', 'surveys');
  })
  .catch(function() {
    console.error('Failed to initialize window.PulseInsightsObject');
  });
})();
</script>

What the tag does

  • Identifies the browser, or creates a new Device UDID

  • Fetches surveys to render, if any

  • Renders any survey with its appropriate formatting

  • Collects user responses, if the user answers

Finding your specific tag

You can find your tag in your Console account under Settings > Get Code Snippet or by using your Tag Integration Guide that your Client Success Manager emailed to you.

On rare occasions, Pulse Insights will customize your tag to better support your particular environment. If you received a Tag Integration Guide from your Client Success Manager with a modified tag, use that.

Tag Deployment FAQs

Which pages should have the Pulse Insights code snippet?

In general, we recommend placing your snippet across all pages of your site(s). This enables easy survey launches in new site areas and accurate visit and session pageview count targeting.

If you're only using Pulse Insights on a specific selection of pages, it is OK to solely deploy the tag to those pages.

Where on the page should we place the code snippet?

We recommend placing your Pulse Insights Code Snippet just above the closing body tag in the page or configuring to fire after the page content has loaded.

Can we use a tag manager to deploy Pulse Insights?

Yes. Pulse Insights is compatible with tag managers. We recommend using the Custom HTML option in case your specific tag differs from the tag manager's built-in tag template.

However, it should not be placed inside of a Doubleclick Floodlight Tag, as Pulse Insights needs access to the parent page to render a survey and Floodlight tags create an invisible iframe and load tags inside of it.

Does the Pulse Insights tag work with [X] CMS?

Yes, the CMS you use doesn't impact the tag's functionality.

Do we use the same code snippet across secure/non-secure pages?‍

Yes. The code snippet works across both http and https pages. There are no special configuration settings to enable HTTPS calls to render properly.

Do we use the same tag across multiple domains and subdomains?

Yes, you use the same code snippet across all domains, subdomains and environments on which you’d like to serve surveys and collect user feedback that are covered by your license. For questions regarding what is covered by your license, please reach out to your Client Success Manager.

Do we use the same tag across our development, staging, and production environments?

PreviousImplementing on Web and Mobile WebNextIngesting contextual data for targeting and analysis

Last updated 1 year ago

Was this helpful?

Executes , if any, to integrate the data with other tag-based vendors

Yes, you use the same code across environments. Learn about our .

callbacks
QA features