Telegram Pixel Tag — Installation and Integration Guide for Conversion Tracking in Telegram Ads
Learn how to set up the Telegram Pixel Tag on your website for accurate conversion tracking from Telegram ads. Step-by-step instructions for Tilda, GetCourse, WordPress, and other platforms.
The Telegram Pixel Tag is a fundamental tool for measuring the effectiveness of Telegram ad campaigns. Without systematic conversion tracking (sales, registrations), accurate ROI calculation and data-driven ad optimization in Telegram are impossible.
This guide covers all stages: from basic setup to in-depth instructions for specific platforms and troubleshooting. It is suitable for both beginners and experienced professionals.
The Telegram Pixel Tag is a JavaScript tracking code. Its function is similar to that of a postman: it records every event on your website (page view, click, purchase) and sends an encrypted notification to your Telegram Ads advertiser account.
This data flow — user → action on the site → pixel triggering → metrics transmission — works just like the Facebook Pixel or Yandex.Metrica. All collected data is automatically aggregated in the "Statistics" and "Events" sections of your dashboard, forming the foundation for analyzing campaign performance and building retargeting audiences.
The Telegram Pixel Tag supports event tracking — key user actions on your website. At the time of writing, 19 types of events are available, divided into two categories:
The correct choice of events directly impacts the accuracy of conversion measurement, the quality of retargeting audiences, and the effectiveness of ad campaign optimization.
Events supported by Telegram Pixel Tag:
page_view: Loading any page on the website. Scenario: Basic traffic and engagement tracking.lead: Form submission (e.g., "Submit a request"). Scenario: Evaluating lead form effectiveness.registration: Successful account registration. Scenario: Measuring the influx of new users.add_to_cart: Adding an item to the shopping cart. Scenario: Analyzing pre-purchase behavior in e-commerce.purchase: Completed payment. Scenario: Core metric for ROI and ad revenue.For specific tasks (e.g., "play video" or "open support chat"), set up custom events. The main rule is to track only those actions that correlate with your business goals. The more relevant your event set, the higher the quality of data for tracking and optimization decisions.
The Telegram Pixel Tag provides key advantages for conversion tracking in Telegram, but each comes with an engineering trade-off.
purchase and lead events are recorded directly, increasing ROI visibility. However, you risk getting incomplete data if you forget to configure the necessary events.For advertisers working exclusively in Telegram, these trade-offs are justified. The Telegram Pixel Tag is a must-have tool, although multi-channel strategies will require additional solutions.
The process of installing the Telegram Pixel Tag consists of four mandatory steps:
Log into your Telegram advertiser account, go to the "Manager Events" section, and click "Create Pixel". Set a name and copy the provided code. Important: The base code (library initialization) and the event code (sending a specific action) are different snippets. The pixel is tied to the entire account, not to a single campaign.
The base code (JavaScript) must be added to the <head> section of every HTML document. It should load on all pages where tracking is required. Instructions for popular platforms:
header.php file.<head> of your template.The base code only initializes the pixel. To track conversions (e.g., "Buy"), configure events. In Manager Events, create the desired event (e.g., purchase) and get its unique code. Insert this code into the action handler on your website: in the onclick attribute of a button or in the form submission script.
Example for a purchase event passing value: For custom events (e.g., video_play), assign an arbitrary name. Pass additional parameters (value, currency) for more accurate analysis.
Verification is mandatory. Check:
Common Errors and Solutions:
Detailed instructions for Tilda, GetCourse, and WordPress.
In the Tilda editor: Site Settings → SEO → "Code in HEAD" field → paste the Telegram Pixel Tag base code. For events: in a "Button" or "Form" block, open "More" (Дополнительно) → "Event Code" → paste the code (e.g., for purchase).
In the GetCourse admin panel: Settings → Site → Additional → "Code in HEAD" → paste the base code. For events: in the page builder, select a button or form → "Advanced settings" → "Event Code".
Install the "Insert Headers and Footers" plugin (or WPCode). In its settings → "Scripts in Header", paste the base code. For events, use the "Code Snippets" plugin or edit your theme files (e.g., functions.php). Example for WooCommerce — tracking "add to cart" via the woocommerce_after_add_to_cart_button filter.
Ready-made PHP snippet to add to functions.php: Test all changes in a staging environment. After inserting the code, publish/save your changes.
Telegram Pixel Tag Limitations:
Common Errors and Solutions:
<head> or not on all pages.