Skip to content

Publishing and Embedding ​

Once you've configured your placement and content rules, you're ready to publish and embed it on your website.

Publishing Your Placement ​

Placements have two statuses:

  • Draft: Work in progress, not active on your website
  • Published: Active and serving content

How to Publish ​

  1. Complete your placement configuration
  2. Click the Save dropdown in the top-right corner
  3. Choose one of:
    • Save Draft: Save changes without publishing
    • Save and Publish: Save changes and make them live

Save

Before Publishing ​

Ensure:

  • All content rules have valid URL patterns
  • All content selectors have content assigned
  • Any schedule conflicts have been resolved with priorities
  • You've tested your URL patterns

Embedding on Your Website ​

After publishing, embed your placement on your website with two code snippets.

Step 1: Add the JavaScript Configuration ​

Navigate to the Preview & Embed tab to get your embed code.

Add this script to your website's <head> or before the closing </body> tag:

html
<script type="module">
  import VideobotPlacement from 'https://videobot.com/embed/placement.mjs';

  VideobotPlacement.configure({
    accountId: 'your-account-id',
    placements: {
      "your_placement_key": "your-placement-key"
    }
  });
</script>

Copy

Note: Placement keys are converted from hyphens to underscores in the configuration. For example, product-pages becomes product_pages.

Step 2: Add HTML Elements ​

Place HTML elements where you want content to appear:

html
<div data-videobot-placement="your_placement_key"></div>

The placement system will:

  1. Check the current page URL
  2. Find matching content rules
  3. Load and display the appropriate content in the <div>

Copy 2

Multiple Placements ​

You can have multiple placements on the same page:

html
<script type="module">
  import VideobotPlacement from 'https://videobot.com/embed/placement.mjs';

  VideobotPlacement.configure({
    accountId: 'your-account-id',
    placements: {
      "header_bot": "header-bot",
      "product_assistant": "product-assistant",
      "checkout_helper": "checkout-helper"
    }
  });
</script>

<!-- Place these elements where you want each placement to appear -->
<div data-videobot-placement="header_bot"></div>
<div data-videobot-placement="product_assistant"></div>
<div data-videobot-placement="checkout_helper"></div>

Best Practices ​

Rule Organization ​

  1. Order matters: Rules are evaluated top-to-bottom; put more specific rules first
  2. Use descriptive names: Make rules easy to identify at a glance
  3. Group related rules: Keep similar URL patterns together

URL Pattern Tips ​

  1. Start specific, then broaden: Create specific rules first, then add catch-all rules at the bottom
  2. Use prefix for sections: /products/ is simpler than complex wildcards
  3. Test thoroughly: Always test patterns with real URLs before publishing
  4. Document your patterns: Use clear rule names that explain what they match

A/B Testing Guidelines ​

  1. Run tests for enough time: Ensure statistical significance
  2. Change one variable: Test content, not multiple changes at once
  3. Monitor results: Check analytics to determine winners
  4. Start with 50/50 splits: Equal distribution provides clean data

Scheduling Tips ​

  1. Plan for time zones: Consider when your audience is active
  2. Set fallbacks: Always have default content for unscheduled times
  3. Resolve conflicts early: Don't leave priority issues until publishing
  4. Test transitions: Verify content changes correctly at scheduled times

Performance ​

  1. Use fewer rules when possible: Fewer rules means faster matching
  2. Avoid complex regex: Simple patterns are faster to evaluate
  3. Limit exclusions: Each exclusion adds processing time

Troubleshooting ​

Content Not Appearing ​

  1. Check publication status: Ensure the placement is published
  2. Verify the URL pattern: Use the Test URL feature to confirm matching
  3. Check the console: Look for JavaScript errors in browser dev tools
  4. Verify content is published: Only published bots/widgets can be displayed

Wrong Content Appearing ​

  1. Check rule order: Remember, first match wins
  2. Review exclusions: Ensure you haven't accidentally excluded the URL
  3. Check schedules: Verify current time matches the schedule entry
  4. Review A/B allocation: If using A/B testing, different visitors see different content

Schedule Conflicts ​

  1. Open the schedule entry: The conflict warning shows which entries overlap
  2. Set different priorities: Higher numbers = higher priority
  3. Consider restructuring: Adjust date/time ranges to avoid overlap