Pro Feature
Embed widgets are available on Pro plans and above.View pricing →
Embed your promo code widgets directly on your website to provide a seamless experience for your users. We offer two embedding methods: iframe and JavaScript widget.
Method 1: Iframe Embed (Recommended)
The simplest way to embed your promo code widget. Just copy and paste the iframe code into your website.
Basic Iframe Code
<iframe
src="https://promocodequeue.com/promo/YOUR_PUBLIC_ID/embed"
width="100%"
height="600"
frameborder="0"
style="border: none; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
</iframe>
Customization Options
- Width: Set to "100%" for responsive design, or use fixed pixels (e.g., "500px")
- Height: Adjust based on your content needs (recommended: 400-800px)
- Styling: Customize border-radius, box-shadow, and other CSS properties
Method 2: JavaScript Widget
For more control and better integration, use our JavaScript widget. This method allows for dynamic loading and better responsive behavior.
Step 1: Include the Widget Script
<script src="https://promocodequeue.com/widget.js"></script>
Step 2: Add Widget Container
<div
data-promo-widget="YOUR_PUBLIC_ID"
data-promo-width="100%"
data-promo-height="600">
</div>
JavaScript API
For programmatic control, you can also initialize the widget using JavaScript:
// Initialize widget programmatically
PromoCodeQueueWidget.init('YOUR_PUBLIC_ID', '#widget-container', {
width: '100%',
height: 600
});Getting Your Public ID
To get your promotion's public ID:
- Log into your dashboard
- Navigate to your product
- Go to the "Embed Widget" section
- Copy the public ID for your desired promotion
Best Practices
Responsive Design
- • Use width="100%" for responsive behavior
- • Test on mobile devices to ensure proper display
- • Consider using CSS media queries for different screen sizes
Performance
- • The widget loads asynchronously and will not block your page
- • Consider lazy loading for widgets below the fold
- • The iframe method provides better isolation
Security
- • All widgets include built-in fraud protection
- • Cloudflare Turnstile integration prevents bots
- • IP-based rate limiting protects against abuse
Troubleshooting
Widget not loading?
- • Check that your public ID is correct
- • Ensure the promotion is active and not archived
- • Verify your website allows iframe embedding
Styling issues?
- • Check for CSS conflicts with your website
- • Ensure the container has sufficient width and height
- • Try the JavaScript widget for better integration
Need Help?
If you are having trouble with the embed widget, we are here to help!