Documentation
Everything you need to integrate and customize Gossiped
Quick Start Guide
Get Gossiped running on your website in under 5 minutes.
Create Your Account
Sign up for a free Gossiped account and verify your email address.
Create AccountCopy the Code
Get your unique embed code from the integration page.
<div id="gossiped-comments"></div>
<script src="https://gossiped.com/embed.js" data-site-id="YOUR_SITE_ID"></script>
Paste and Go Live
Add the code to your webpage where you want comments to appear.
Basic Integration
HTML Integration
The simplest way to add Gossiped to any webpage:
<!-- Place this where you want comments to appear -->
<div id="gossiped-comments"></div>
<!-- Load Gossiped script -->
<script src="https://gossiped.com/embed.js"
data-site-id="your-site-id"
data-page-url="https://yoursite.com/current-page"
data-page-title="Your Page Title">
</script>
Required Parameters
Your unique site identifier from the Gossiped dashboard
Optional Parameters
Specific URL for this page's comments (defaults to current URL)
Title for this discussion (defaults to page title)
Color theme (defaults to auto)
Minimum height in pixels (defaults to 400)
Configuration Options
JavaScript Configuration
For more control, you can configure Gossiped programmatically:
window.GossipedConfig = {
siteId: 'your-site-id',
container: '#gossiped-comments',
theme: 'auto',
height: 500,
defaultSort: 'popular',
allowGuests: true,
moderationMode: 'auto',
onReady: function() {
console.log('Gossiped loaded successfully');
},
onNewComment: function(comment) {
console.log('New comment posted:', comment);
}
};
Theme Customization
Customize the appearance to match your website:
window.GossipedTheme = {
primaryColor: '#3b82f6',
backgroundColor: '#ffffff',
textColor: '#374151',
borderColor: '#e5e7eb',
borderRadius: '8px',
fontFamily: 'inherit'
};
WordPress Integration
Method 1: Theme Integration
Add Gossiped directly to your WordPress theme files:
<?php
// Add to single.php or page.php after the content
if (is_single() || is_page()) {
echo '<div id="gossiped-comments"></div>';
echo '<script src="https://gossiped.com/embed.js"
data-site-id="your-site-id"
data-page-url="' . get_permalink() . '"
data-page-title="' . get_the_title() . '">
</script>';
}
?>
Method 2: Functions.php Hook
Add to your theme's functions.php file:
function add_gossiped_comments() {
if (is_single() || is_page()) {
$site_id = 'your-site-id'; // Replace with your actual site ID
$page_url = get_permalink();
$page_title = get_the_title();
echo "<div id='gossiped-comments'></div>";
echo "<script src='https://gossiped.com/embed.js'
data-site-id='{$site_id}'
data-page-url='{$page_url}'
data-page-title='{$page_title}'>
</script>";
}
}
add_action('wp_footer', 'add_gossiped_comments');
Method 3: Shortcode
Create a shortcode for easy insertion:
function gossiped_shortcode($atts) {
$atts = shortcode_atts(array(
'site-id' => 'your-site-id',
'height' => '400'
), $atts);
$output = "<div id='gossiped-comments'></div>";
$output .= "<script src='https://gossiped.com/embed.js'
data-site-id='{$atts['site-id']}'
data-height='{$atts['height']}'>
</script>";
return $output;
}
add_shortcode('gossiped', 'gossiped_shortcode');
// Usage: [gossiped site-id="your-site-id" height="500"]
API Reference
REST API Endpoints
Base URL: https://gossiped.com/api/v1/
Retrieve comments for a specific page
Parameters:
- page_url (required) - URL of the page
- limit (optional) - Number of comments (default: 50)
- offset (optional) - Pagination offset (default: 0)
- sort (optional) - Sort order: newest, oldest, popular
curl -X GET "https://gossiped.com/api/v1/comments?page_url=https://yoursite.com/article" \
-H "Authorization: Bearer YOUR_API_KEY"
Create a new comment
curl -X POST "https://gossiped.com/api/v1/comments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page_url": "https://yoursite.com/article",
"content": "This is a great article!",
"parent_id": null
}'
Get comment statistics for your site
curl -X GET "https://gossiped.com/api/v1/stats" \
-H "Authorization: Bearer YOUR_API_KEY"
Troubleshooting
Comments Not Loading
- Check that your site-id is correct
- Verify the page URL matches your registered domain
- Check browser console for JavaScript errors
- Ensure your site is approved in the Gossiped dashboard
- Try disabling ad blockers temporarily
HTTPS Issues
- Ensure your website uses HTTPS
- Update embed code to use https:// URLs
- Check Content Security Policy (CSP) settings
Performance Issues
- Load Gossiped script asynchronously
- Implement lazy loading for below-the-fold comments
- Optimize your page caching settings
- Consider using a CDN