Code injection

Forms hosted on a custom domain have access to a code injection block. This allows you to inject code snippets or custom styles on both form and domain level. Think of:
✔️ Injecting analytics tracking codes
✔️ Adding custom events
✔️ Styling forms with custom CSS
✔️ Using your own custom font
✔️ Adding widgets (Intercom, Buy Me a Coffee…)
 
notion image
Code injection box is Tally Pro feature and requires coding skills.
 


 

How to inject code

Start by setting up your custom domain. Then, open Custom Domains in your Tally dashboard.

On domain level

Click your domain to open it and scroll down. You'll find the code injection box in the general settings of your custom domain. Paste your code snippets and click Save changes.
notion image
 
⚠️
Code injection on domain level will affect all the forms connected to your (sub)domain.
 

On form level

Click the dots icon to the pretty URLs and open Page settings.
notion image
You’ll find the code injection box in the bottom. Paste your code snippets and click Save changes.
notion image
 

Injecting custom CSS

You can inject custom CSS codes into the code injection box or use the 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.
Code snippet
<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 Facebook Pixel

You can either use our Facebook Pixel integration or inject the Facebook 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 Analytics Global Site 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.
 
 
Help