Skip to content

VUUKLE_CONFIG schema

VUUKLE_CONFIG is the global object every Vuukle widget reads from on page load. The schema is deliberately small — it carries the things only the browser knows (which article you’re on, what its title is, what its image is), plus an optional SSO hook.

Everything else — theme, login methods, character limits, sort order, moderation thresholds, emote images, custom translations — is configured from the Vuukle dashboard → Site Settings, not from this object. That separation means non-technical admins can change behaviour without redeploys, and all sites on the same account stay consistent.

Complete schema

interface VuukleConfig {
// Required
apiKey: string;
// Article identity (optional — articleId falls back to page URL)
articleId?: string | number;
// Article metadata (strongly recommended)
title?: string;
url?: string;
img?: string;
tags?: string;
author?: string;
// SSO — the one auth integration that has to be wired browser-side
comments?: {
auth?: {
sso?: { onClick: () => void };
};
};
}

Required

FieldTypeDescription
apiKeystringPublic API key from Integration → API Key in the dashboard. The same key works across every article on the same site.

Article identity & metadata

FieldTypeDescription
articleIdstring | numberOptional. Stable per-article identifier. If omitted, Vuukle uses the page’s URL. Recommended for sites where URLs can change.
titlestringArticle title. Used in shared comment URLs and Open Graph previews.
urlstringCanonical article URL with scheme.
imgstringArticle hero image URL. Surfaces in recommendation cards and OG previews.
tagsstringComma-separated tags. Improves recommendation matching.
authorstringByline.

SSO (the only auth method wired browser-side)

FieldDescription
comments.auth.sso.onClickFunction called when the visitor clicks “Sign in” in the comment widget. Open your own login modal here, then call window.vuukleLogin(token) with a signed SSO token once they’re authenticated.

All other login providers (Facebook, Google, Twitter, Disqus, email/password, Vuukle native) are toggled from Site Settings → Comment Widget → Login methods in the dashboard.

Widget anchors

Drop the corresponding <div> wherever you want a widget to render:

HTMLRenders
<div id="vuukle-comments"></div>Comments
<div id="vuukle-emote"></div>Emotes
<div id="vuukle-newsfeed"></div>Newsfeed
<div class="vuukle-subscribe"></div>Newsletter subscribe
<div class="vuukle-sharebar"></div>ShareBar (horizontal)
<div class="vuukle-sharebar-vertical"></div>ShareBar (vertical sticky)
Any element with data="vuukle-count"Live comment count

For endless / infinite-scroll mode, append -{UNIQUE_INDEX} to each anchor — see infinite scroll install.

What lives in the dashboard, not here

If you’re looking for a config option that used to be in VUUKLE_CONFIG, this is where it moved:

Old config keyNow configured in
theme.color, theme.darkModeSite Settings → Comment Widget → Theme
comments.maxChars, commentingClosed, countToLoad, sortingSite Settings → Comment Widget
comments.auth.{facebook,google,twitter,disqus,password,vuukle}Site Settings → Comment Widget → Login methods
comments.editorOptionsSite Settings → Comment Widget → Editor
comments.toxicityLimit, spamLimitSite Settings → Comment Widget → Moderation
comments.customText, emotes.customText, powerbar.customTextTranslations are shipped centrally; missing strings → email support
comments.transliterationSite Settings → Comment Widget → Transliteration
emotes.firstImg/firstNamesixthImg/sixthNameSite Settings → Emote settings
emotes.disable, emotes.size, emotes.hideRecommendedArticlesSite Settings → Emote settings
powerbar.defaultEmote, powerbar.verticalPositionSite Settings → ShareBar Settings
recommendationsWideImages, globalRecommendations, linkSite Settings → Newsfeed
languageAuto-detected from <html lang> and navigator.language; site default in Site Settings → Comment Widget → Language
wordpressSyncHandled automatically by the WordPress plugin

Minimum install

<script>
var VUUKLE_CONFIG = {
apiKey: 'YOUR_PUBLIC_API_KEY',
};
</script>
<script src="https://cdn.vuukle.com/platform.js" async></script>
<div id="vuukle-comments"></div>

That’s a complete working integration. articleId defaults to the page URL.

Recommended install (with article metadata)

<script>
var VUUKLE_CONFIG = {
apiKey: 'YOUR_PUBLIC_API_KEY',
articleId: 'post-12345',
title: 'How to grow a tomato in winter',
url: 'https://example.com/blog/grow-tomato-winter',
img: 'https://example.com/img/tomato.jpg',
tags: 'gardening, tomato, winter',
author: 'Jane Doe',
};
</script>
<script src="https://cdn.vuukle.com/platform.js" async></script>

SSO token generation

Server-side signing in Node, Python, PHP. SSO token →

Dashboard tour

What lives where in Site Settings. Dashboard →

Was this page helpful?
Help us improve — drop a note or open the dashboard.