Track visitors from TikTok in Matomo
Matomo can track visitors who arrive from TikTok using campaign parameters or you can manually capture the TikTok click ID (ttclid). For organic traffic, TikTok does not send a standard HTTP referrer, so without campaign parameters, these visits may appear as Direct Entry in Matomo.
For TikTok Ads, TikTok automatically appends a ttclid parameter to the destination URL. While Matomo tracks the visit, the click ID is not stored for reporting unless you capture it manually.
This guide explains how to track TikTok traffic in Matomo using campaign parameters.
Track organic TikTok traffic
To ensure visits are attributed correctly in Matomo, add campaign parameters to the links that you share on TikTok. When visitors click the tagged link and arrive on your website, Matomo automatically attributes the visit to the campaign.
Without campaign parameters, these visits may appear as Direct Entry because TikTok does not always provide a standard HTTP referrer.
Create a campaign URL
- Use the Matomo campaign URL builder to construct the destination URL with UTM parameters. For example:
https://example.com/?utm_source=tiktok&utm_medium=social&utm_campaign=summer_sale - Add the campaign URL to TikTok, for example in your profile, posts, or ads.
- To test campaign tracking, click the tagged URL from your TikTok profile or post.
- Confirm that the visit appears in Visitors > Real-time report.
- After reports have processed, analyse the Acquisition > Campaigns reports.
- If you are not seeing campaign information with the visit, review the campaign tracking troubleshooting guide.
Track TikTok click IDs
To analyse or export the ttclid value, manually capture it using a visit-scope Custom Dimension in the Matomo tracking code or in Matomo Tag Manager. Refer to the guide on manually capturing click IDs in Matomo.
Track dedicated landing pages or coupon codes
If campaign parameters or the TikTok click ID are not suitable, consider these alternatives:
- Create a unique landing page or URL that is only shared on TikTok. Since only TikTok visitors use this URL, you can attribute traffic and conversions on that page to TikTok.
- Offer a unique coupon code, such as
TIKTOKFREEin your TikTok content. You can then measure conversions by tracking coupon code usage in Matomo. See How to display coupon codes in Matomo for implementation guidance.
Choose the tracking approach that best suits your needs. Campaign parameters are recommended for most websites, while the TikTok click ID, and other methods provide additional ways to analyse traffic and measure conversions.