Here’s a helpful script by Igor Litvinenko (Borodaty Arbitrazh) for those who drive traffic from TikTok.
Hello everyone!
If you’re working with TikTok, this tutorial is right up your alley! The script automates expenses broadcasting in Keitaro related to your campaigns and various accounts.
In this case, expenses were broadcasted from 00:00 to 23:59 Moscow time.
I used MySQL. I wanted to make it simple, but files create more complications than the DBMS (so you’ll have to give it a time during the installation if you have never done this before)
The downside:
Only Keitaro BUSINESS works in this case since Admin API is available only in the business version of the tracker.
DOWNLOAD: https://github.com/m0pfin/TT.CostLoadKeitaro
Installation:
- Download the script archive
- Upload it to a hosting/server
- Insert the data into the database in the /include/config.php file
- In the /kt_load.php file, insert the API_KEY for Keitaro and your domain/IP with tracker installed
- Import the /tokens.sql file into phpMyAdmin
- If you have done it right, then you will get the following by entering the script address

7. After an account is added to the script, you can check if it works by clicking the button on the right (mouse wheel)
How do I Use the Script?
- Log into TT account
- Download an extension for your anti-detect browser (or wherever your accounts are)
- https://chrome.google.com/webstore/detail/dolphin-tt/ipjboigiejagkjgffdhcmdpkldmjfghe?hl=ru (thanks to Dolphin for the extension)
- Copy the token and paste it into the script
- THE HARDEST PART is the CRON setup. PHP scripts cannot run by themselves, so you must create a CRON task with the script running intervals. I will illustrate it by example on my server with VESTA CP installed
- Set the task to the ttGetCampaign.php file

5* (asterisks) mean it’ll perform a task every minute. You can set it up at will, just look through the documentation.
In case you want to set a custom run time, opt for CRON SYNTAX: https://losst.ru/nastrojka-cron
How will the Script Know Which KEITARO Campaign to Link the Expense to?
It’s unbelievably simple.
- Create a campaign in the tracker
- View the campaign ID

3. Insert the Keitaro campaign ID in the TikTok campaign name, enclosing {id} in curly brackets
For example:

Now the statistics from the cabinet will be allocated by the ID in curly brackets. Keitaro will understand which campaign to link the expense to.
P.S. I have not yet discovered how to set up the currency of the cabinet, so the default currency is USD (I hope your Keitaro and TT cabinets support USD =)
– 1 campaign in TT = 1 campaign in KT is a rule (i.e. you must not have another campaign with ID 158 in TikTok, for example, otherwise, the expenses will be overwritten)
– The script works with multiple accounts, so you are free to add 5-15-25 tokens. I haven’t tested more tokens yet)
Well, that’s kinda it. Contact me in TG @m0pfin with your suggestions/improvements/bugs
All the best, yours sincerely, Borodaty Arbitrazh.