How to Install Your Viewers Embed Code

Your Viewers embed code is a small snippet of JavaScript that powers the lead capture widget on your website. This guide walks you through generating your code and installing it on popular website platforms.

Before You Begin

Important: Your embed code is unique to your account and configuration. Every time you make changes to your widget settings - such as enabling modules, adjusting display options, or updating branding - you’ll need to copy your new embed code and reinstall it on your website.


Step 1: Generate Your Embed Code

  1. Log in to your Viewers dashboard
  2. Navigate to Settings → Embed Code (or click “Get Embed Code” from your dashboard)
  3. Configure your widget options:
    • Select which modules to enable (we recommend keeping as many active as possible to maximize conversions)
    • Adjust your display settings
    • Configure any module-specific options
  4. Click Copy to copy your embed code to your clipboard

Your embed code will look something like this:

html

<script src="https://app.viewers.com/widget/YOUR-UNIQUE-ID.js" async></script>

Step 2: Install on Your Website

Your embed code should be placed in the footer of your website, just before the closing </body> tag. This ensures your widget loads without slowing down your page content.

Choose your platform below for specific instructions:


WordPress

  1. In your Viewers.com dashboard, choose WordPress as the installation method. Download the Viewers.com Embed plugin, upload to your site, and install it.
  2. In WordPress, go to Settings → Viewers.com Embed
  3. Paste your API key into your plugin.
  4. Click Save. Done! All changes are now automatically synced in real time.

Shopify

  1. From your Shopify admin, go to Online Store → Themes
  2. Click Actions → Edit Code on your current theme
  3. Under the Layout folder, click on theme.liquid
  4. Scroll to the bottom and find the </body> tag
  5. Paste your Viewers embed code on a new line directly above </body>
  6. Click Save

Wix

  1. Go to your Wix dashboard and open your site in the Editor
  2. Click Settings in the left menu
  3. Select Custom Code under the Advanced section
  4. Click + Add Custom Code
  5. Paste your Viewers embed code
  6. Name it “Viewers Widget”
  7. Under Add Code to Pages, select “All pages”
  8. Under Place Code in, select Body – end
  9. Click Apply

Squarespace

  1. Go to Settings → Advanced → Code Injection
  2. Scroll down to the Footer section
  3. Paste your Viewers embed code
  4. Click Save

Webflow

  1. Open your project in the Webflow Designer
  2. Click the Settings icon (gear) in the left panel
  3. Go to the Custom Code tab
  4. Paste your Viewers embed code in the Footer Code section
  5. Click Save Changes
  6. Publish your site for the changes to go live

HubSpot

  1. Go to Settings → Website → Pages
  2. Click on Templates in the left sidebar
  3. Select Site Footer HTML
  4. Paste your Viewers embed code
  5. Click Save

Google Tag Manager

  1. Log in to your Google Tag Manager account
  2. Click Tags → New
  3. Name the tag “Viewers Widget”
  4. Click Tag Configuration → Custom HTML
  5. Paste your Viewers embed code
  6. Click Triggering and select All Pages
  7. Click Save, then Submit and Publish your container

Custom HTML / Other Platforms

For any website where you have access to the HTML:

  1. Open your website’s main template or layout file
  2. Locate the closing </body> tag
  3. Paste your Viewers embed code on a new line directly above </body>
  4. Save and upload your file
<!-- Your page content above -->
    
<!-- Viewers Widget -->
<script src="https://app.viewers.com/widget/YOUR-UNIQUE-ID.js" defer></script>

</body>
</html>

Verifying Your Installation

After installing your embed code:

  1. Visit your website in a new browser window (or incognito/private mode)
  2. Look for the Viewers widget to appear in the corner of your screen
  3. Test the widget by interacting with it
  4. Check your Viewers dashboard to confirm leads are being captured

Troubleshooting

Widget not appearing?

  • Clear your cache: Both your browser cache and any site caching plugins
  • Check for conflicts: Temporarily disable other plugins to identify conflicts
  • Verify placement: Ensure the code is inside the <body> tags, not the <head>
  • Wait a few minutes: Some platforms take time to propagate changes

Widget looks different than expected?

Remember: changes to your widget configuration require reinstalling your embed code. If you’ve updated settings in your Viewers dashboard, copy the new embed code and replace the old one on your website.


Updating Your Embed Code

Whenever you modify your widget settings in the Viewers dashboard, follow these steps:

  1. Generate your new embed code from Settings → Embed Code
  2. Copy the updated code
  3. Remove the old embed code from your website
  4. Paste the new embed code in its place
  5. Save and clear any caches

Need Help?

If you’re having trouble installing your embed code, our support team is here to help. Contact us or use the chat widget in your dashboard.