Wix
A Wix site uses the same widgets as any other site: one script tag and a publishable key, pasted into an Embed HTML element. There is no app to install, it works on every Wix plan, and all 22 widgets work.
1. Get a key#
Create a publishable key (kj_pub_…) in the dashboard.
Never paste a secret key (kj_live_… or kj_test_…) into a page: everything
in an embed is sent to every visitor's browser.
2. Add an Embed HTML element#
In the Wix Editor: Add Elements → Embed Code → Embed HTML. In Wix Studio the same element is under Add → Embed code. Choose Code, paste one of the examples below, and Update.
Then drag the element's handles to size it. Wix draws an embed in a frame of the size you give it, and the frame does not grow with its content: give a panchang about 700 px of height, and a kundli form or a match form at least 900 px — a report taller than the frame scrolls inside it.
Each embed is its own frame, so each needs its own script tag, as in the examples.
3. Add the frame's origin to the key#
Wix runs each Embed HTML element in a frame served from its own address, not
from your domain, and that address is the origin the key must list. It looks
like https://8748b4d8-dc59-4afd-9bb1-aa7c0cfb7c2a.filesusr.com. If it ever
changes, the widget names the new one in the same way.
You do not have to find it yourself. Publish the page and open it: the widget says
This key does not allow https://….filesusr.com. Add that origin to the key.
Copy that address into the key's origins in the dashboard — exactly as shown, no trailing slash — and reload the page. See authentication.
Add your own domain too only if you also use the key on a page that is not a
Wix embed. Wildcards are not supported: https://*.filesusr.com would let every Wix
site use your key.
Examples#
Replace kj_pub_your_key with your key in each.
Today's panchang#
The day's tithi, nakshatra, yoga, karana and vara, sunrise and sunset, and the day's windows, for a city. 1 credit a page view.
<script src="https://cdn.kaaljyoti.com/widgets/v1.js" data-key="kj_pub_your_key" defer></script>
<kj-panchang city="delhi"></kj-panchang>
For a place that is not one of the built-in cities, give the coordinates and a
label; see <kj-panchang>.
Panchang and muhurta, in Hindi#
Two widgets in one frame, both in Hindi. 2 credits a page view.
<script
src="https://cdn.kaaljyoti.com/widgets/v1.js"
data-key="kj_pub_your_key"
data-lang="hi"
defer
></script>
<kj-panchang city="varanasi"></kj-panchang>
<kj-muhurta city="varanasi"></kj-muhurta>
A kundli page#
A birth form with a place search; on submit, a report in tabs. 7 credits per
submit, then more as tabs are opened — see
<kj-kundli-form>.
<script src="https://cdn.kaaljyoti.com/widgets/v1.js" data-key="kj_pub_your_key" defer></script>
<kj-kundli-form></kj-kundli-form>
Horoscopes#
The twelve signs as icons; a visitor picks one, then the day, week, month or year. Nothing is asked for until a sign is picked; 5 credits per sign, period and day.
<script src="https://cdn.kaaljyoti.com/widgets/v1.js" data-key="kj_pub_your_key" defer></script>
<kj-horoscope></kj-horoscope>
Kundli matching#
Ashtakoot guna milan from two birth forms. 3 credits per submit.
<script src="https://cdn.kaaljyoti.com/widgets/v1.js" data-key="kj_pub_your_key" defer></script>
<kj-match-form></kj-match-form>
Matching your site#
The frame does not see your site's styles, so pick the look on the script
tag: data-theme="light" or "dark" draws a card, and data-preset picks
its style.
<script
src="https://cdn.kaaljyoti.com/widgets/v1.js"
data-key="kj_pub_your_key"
data-theme="light"
data-preset="traditional"
defer
></script>
<kj-panchang city="jaipur"></kj-panchang>
Every other script and element attribute — sign icons, the place search,
colours through custom properties — works exactly as on the
widgets page; put any CSS in a <style> tag in the same
embed.
What a page costs#
The widgets run in each visitor's browser, so every figure is per page view, at the credits of the routes each widget calls. Identical requests in one frame are made once; two frames do not share answers. A site out of credits for the month shows a polite "Monthly limit reached" card in place of the widget.
What a Wix site cannot do#
- No PDFs. A PDF is never made for a publishable key, and a PDF button needs a server proxy holding a secret key, which a Wix page has nowhere to run.
- No server rendering, for the same reason.
FAQ#
Is there a Wix app?#
No. Apps in the Wix App Market must bill site owners through Wix, and Kaal Jyoti credits are bought directly from us, so the widgets go in with an Embed HTML element instead. It does the same job, with all 22 widgets.