• Overview
  • How to Use
  • Similar Templates

API Unlock Contest

Use the API Unlock template to trigger advanced user actions and verify entries in real time using a custom Javascript tracking script.

This template is designed for developers and advanced users who need to track on-site actions that cannot be verified through standard URL visits or social integrations. Use it to unlock powerful API-based triggers such as form submissions, gated pages, profile completions, or custom user flows.

Simply configure the action in Gleam, embed the tracking script on your website or app, and automatically verify when a specific user completes the required task.

Template Features

  • Tracking support via JavaScript integration
  • Custom Action verification using gleam.track()
  • Ideal for thank-you pages, profile updates, or form completions
  • Works with REST APIs and other web APIs
  • Supports custom field sync and error handling
  • Fully responsive widget embeddable on any web page

This feature is built for flexibility, allowing you to integrate Gleam into unique workflows, microservice architectures, or advanced tracking setups.

Benefits of Using API-Based Tracking

Adding tracking to your campaign allows you to:

  • Track user actions that happen off the main contest widget
  • Confirm actions in real time without user friction
  • Integrate with custom-built tools or web apps
  • Improve campaign accuracy and reduce false entries
  • Maintain full control over user behavior validation

Whether you are building custom journeys, capturing events via webhooks, or layering contests into your SaaS app, API tracking gives you the freedom to tailor Gleam to your architecture.

Integration Support

This template requires basic knowledge of JavaScript and access to your website's codebase. To trigger actions, use the following syntax in your code:

gleam.track('custom_action_name');

Replace 'custom_action_name' with the name of the action configured in your campaign.

Official Gleam Documentation

Frequently Asked Questions

What Is API Tracking In A Giveaway?

API tracking verifies custom user actions on your site—like signups or profile updates—using Gleam’s JavaScript API. Expand to learn how gleam.track() lets you track more than just link clicks.

How Do I Use Gleam to Track Custom Actions With JavaScript?

Embed the Gleam script, then use gleam.track('your_action_name') on form submission or other behaviors. Expand this FAQ to see where and how to implement it properly.

When Should I Use An API Unlock Instead Of Standard Actions?

Use API Unlocks when the user action happens outside of a standard link click or visit. Click to learn when this method is best for SaaS, forms, or app interactions.

Can I Use Gleam API Tracking With A Headless CMS Or SPA?

Yes—gleam.track() works with Single Page Applications and headless setups. Expand this FAQ to learn the best way to implement it with dynamic page states.

Does Gleam Provide API Logs Or Debugging Tools?

Yes. You can view tracked actions inside the Gleam campaign dashboard under the Actions tab. Click to learn how to monitor and debug your API-based tracking events.


Similar Templates

See all

How to Set Up the API Unlock Action

  1. Create a Custom Action
    In your Gleam campaign, add a Custom Action and give it a clear action name. This will be used to match your tracking event from the frontend.
    Learn how to set up a Custom Action

  2. Set Up API Tracking Script
    Embed the Gleam tracking code on the page where the user action should be verified — such as a profile update page, form confirmation, or thank-you screen.
    Use the following snippet to track the custom action: ‘gleam.track('your_action_name');’ Replace 'your_action_name' with the exact name of your Custom Action from Step 1.
    API Tracking Script Reference

  3. Configure Custom Fields (Optional)
    You can extend your action with custom fields to sync form input or capture data directly to your CRM.
    Learn how to sync fields

  4. Connect Integrations for Advanced Logic
    Gleam supports integration with major platforms and custom workflows via Webhooks or REST endpoints.
    See integration options

  5. Finalise and Test Your Campaign
    Publish your campaign and simulate the tracked action to ensure it fires correctly. You can inspect the real-time validation in your Gleam dashboard under the Actions tab.
    How to install your Gleam campaign

This setup is ideal for users who need complete control over the user journey and prefer validation via embedded tracking scripts rather than standard URLs or buttons.

Business
API Unlock Contest

Use the API Unlock template to trigger advanced user actions and verify entries in real time using a custom Javascript tracking script.

Ready to Run Your Own Campaign?

Use this template
OSZAR »