Forms hosted on a custom domain have access to a code injection block. This lets you inject code snippets or custom styles on both form and domain level. For example:
✔️ Inject analytics tracking codes
✔️ Add custom events
✔️ Style forms with custom CSS
✔️ Use your own custom font
✔️ Add widgets (Intercom, Buy Me a Coffee…)
Code injection box is a Tally Pro feature and requires coding skills.
How to inject code
Start by setting up your custom domain. Then, open
Domains
in your Tally sidebar. Are you a developer? Refer to our Developer Resources for in-depth explanation with code examples for custom events, getting and updating input values, and more.
On domain level
Click on your domain to open it and scroll down. You'll find the code injection box in the
General settings
section. Paste your code snippets and click
Save changes
.Code injection on domain level will affect all the forms connected to your (sub)domain.
On form level
Click on your domain to open it. In the
Pretty URLs
section, click the dots icon next to your chosen form and open Page settings
. You’ll find the code injection box in the bottom. Paste your code snippets and click
Save
changes
.Injecting custom CSS
You can inject custom CSS codes into the code injection box or use the
CSS box
available in the design options of the form builder.Common use cases
Use your own font
You can choose any font from the Google Fonts library to use in your Tally forms. But if you’re looking to use your own font, you can inject the code snippet below. Don’t forget to replace the font with your own.
<link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap" rel="stylesheet"> <style> body { font-family: 'Roboto', sans-serif !important; } </style>
Inject the Meta Pixel
You can either use our Meta Pixel integration or inject the Meta Pixel in the code injection box on form or domain level.
Inject the Google Analytics tracking code
The simplest way to track forms with a custom domain is to add the Google Tag tracking code to the code injection box on domain level.
Inject the Plausible Analytics tracking code
Track your forms with Plausible Analytics, a simple and privacy-friendly Google Analytics alternative.
Disable indexing
Forms hosted on a custom (sub)domain are indexed by default. To disable indexing, add this snippet.
<meta name="robots" content="noindex">