Tokei LogoTokei

Embed Guide

Run your giveaway on your own site

How to Run a Giveaway Contest on Your Website

Author: Giles Dawe
4 min read
Published November 30th 2026Updated November 30th 2026

You can run a giveaway contest on your own website. Visitors enter on your page, and Tokei handles the entries, the actions and the entrant list.

This guide shows how to add the Tokei embed widget to any page you control.

A Tokei giveaway widget embedded on the FLIP64 giveaway page
The Tokei widget embedded on flip64.com/giveaway.

Why embed a giveaway

An embedded widget keeps the giveaway beside your own content, so a visitor can read about your product and enter on the same page.

  • Visitors enter without leaving your page.
  • Your own headline, branding and copy sit around the entry form.
  • You paste the snippet once, and widget updates arrive on their own.

Create your giveaway

Build your promotion in Tokei, choose a template, add the prize and entry actions, then publish it. The recording below shows the editor.

Creating a giveaway in the Tokei editor.

Copy the snippet

Open your published promotion in the dashboard, click the Embed icon, then click Copy Snippet. Embedding needs a paid plan and is locked during the trial. The snippet looks like this.

<a class="tokei-widget"
   href="https://tokei.io/contest/YOUR_KEY"
   data-tokei-contest="YOUR_KEY">View the promotion</a>
<script src="https://tokei.io/widget/tokei.js" async></script>
The Tokei sign-up form with name and email fields, Continue and Cancel buttons and a human verification check
The sign-up form entrants see.

Paste it into your site

Add the snippet where you want the giveaway to appear, in any block that accepts custom HTML. The widget replaces the link once the script loads. If the script is blocked, visitors still see a working link to your promotion.

The widget is up to 672px wide, so give it a column with room. Preview the page after you save it, because some site builders only run scripts on the published page.

A live example

FLIP64's giveaway puts the widget beside its own prize artwork and headline.

Embed options

Add data-tokei-theme to the link to override the theme. Host pages can also listen for the TOKEIWidgetReady:YOUR_KEY message, which the widget posts once it has loaded.

If it doesn't load

  • Check that your site builder allows scripts in custom HTML blocks.
  • Check that the contest key in the snippet matches your promotion.
  • If your site sets a Content Security Policy, allow tokei.io for scripts, connections and frames.

Run a giveaway on your site