Zigpoll
  • What is Zigpoll
  • Accounts
    • General Settings
    • Display Settings
    • Visibility Settings
    • Targeting Settings
    • Language Settings
    • Embed Code
    • Monthly Requests
    • Surveys
    • Join Existing Account
  • Surveys
    • General Settings
    • Display Settings
    • Visibility Settings
    • Targeting Settings
    • Language Settings
    • Management Options
    • Slides
    • Survey Preview
    • Import
  • Slides
    • Types of Slides
    • Slide Logic
    • Template Variables
  • Embed
    • Participant Metadata
    • Survey Metadata
    • Template Variables
  • Participants
  • Subscription Plans
    • How we calculate responses
  • Billing
  • Notifications
  • Javascript API
  • Shopify App
    • Log In
    • Shopify Flow
  • Affiliate Program
  • Wordpress
  • Public Link
  • Integrations
    • Klaviyo
    • Mailchimp
    • GetResponse
    • Omnisend
    • Gorgias
    • ActiveCampaign
    • Google Analytics
      • Slack
    • Shopify
    • Google Sheets
  • Tutorials
    • Adding Team Members
Powered by GitBook
On this page

Embed

Have questions about how to embed your Zigpoll? Look no further.

PreviousTemplate VariablesNextParticipant Metadata

Last updated 5 years ago

At the core of any Zigpoll implementation is the embed code. Your embed code can be found at the bottom of your accounts page. If you copy and paste that code into the <head> tag of your website, you are all set.

The embed code looks something like this:

<script type='application/javascript'>
  ;(function () {
    window.Zigpoll = {
      accountId: YOUR_ACCOUNT_ID
    };

    var script = document.createElement("script");
    script.type = "text/javascript";
    script.charset = "utf-8";
    script.src = '${src}';

    document.head.appendChild(script);
  }());
</script>

YOUR_ACCOUNT_ID will be replaced the id for your particular account.

if you need help installing the embed code. For paid plans we offer end to end installation support.

Single Page Web Apps

If you have a single page webapp you can still use Zigpoll. All you need to do is run the following code immediately after you change a page within your app.

window.Zigpoll.refresh();

Load by Poll id

If you want to load a specific poll on a particular page, you can do so by adding a parameter called pollId to the Zigpoll object. For example:

<script type='application/javascript'>
  ;(function () {
    window.Zigpoll = {
      accountId: YOUR_ACCOUNT_ID,
      pollId: YOUR_POLL_ID
    };

    var script = document.createElement("script");
    script.type = "text/javascript";
    script.charset = "utf-8";
    script.src = '${src}';

    document.head.appendChild(script);
  }());
</script>

Will load the poll with id = YOUR_POLL_ID. This will override any display rules which are already set for the page.

Contact us