Head scripts
Last updated
Last updated
Head scripts — are global scripts that executed once per application launch. Telegram Mini App are just HTML pages and contain <head>...</head>
section.
You can insert scripts and CSS into this section. It is suitable for code that should be executed only once (unlike HTML block which inserted on each page visit during navigation between pages).
For example, you can insert:
Google Analytics.
Facebook pixel.
Tracking scripts.
etc.
To insert script, just add code:
Also, you can specify delay for script attaching.
Something unclear in docs or you know how to improve article? Message us or ask community! We will answer you and then promise to improve the article within 3 days.