Introduction
Hello all, Yellow Web continues to experiment with tracker Keitaroand today we're going to look at 6 custom macros to make your life easier and add all sorts of useful features to your procs/lands! I'll also show you how you can make your own macro from any script you often use.
A little background information: the macro in Keitaro - is a set of characters enclosed in curly braces. Most often you come across the macro {offer}
, which is inserted in place of the links on your procards (but there are also many others). When tracker loads the proclu, it replaces the macro with a link leading to the landing page. The same thing happens with other macros: they are replaced by some text.
And I was like, "What if you put in scripts instead of text with macros? Turns out it's possible! The only problem is that Keitaro by default encodes all the text inserted by the macroand to prevent this from happening, ALL of the macros you will find in this article should be written starting with an underlinethen no coding will take place. For example: {_ablank}
For starters. We take and download the macros from here and copy them to the server with Keitaro into a folder: /var/www/keitaro/application/macros. Now let's take them all apart in order.
Macro #1: disable the ability to copy text and save the page
A simple protection against procles theft, designed for beginners: it disables the context menu in the browser and the ability to press Ctrl+S to save the page. Insert immediately after the tag <body> {_disablecopy}
Macro #2: disabling the back button in the browser
When using this macro, the user will only be able to leave your proclamation/land by closing the tab, the "Back" button will not work. Insert immediately after the tag <body> {_disableback}
Macro #3: Replace the Back button with your link
When using this macro, the user, when clicking on the Back button, will be taken to the link that you specify in the macro parameter. The parameter is specified with a colon after the macro name. For example: {_replaceback:https://yellowweb.top}
. I recommend using relative links: create a separate campaign for domonetization, give it some convenient identifier and write something like that in the macro: {_replaceback:newnutraoffer}
Macro #4: Open a strip in a new tab and replace the proclu
When you use this macro, all links on your proclet will have the attribute target=_blank That is, when you click on the link on your booklet, the booklet will open in a new tab. The bookmark itself after a certain number of seconds will be replaced by the link you specify. Use it for domonetization, for example: {_ablank:https://yellowweb.top,3000}
The second parameter is the number of milliseconds of delay, after which the substitution will take place.
Macro #5: Open the "Thank you" page in a new tab and substitute a feed
About the same as for procles, but for links. The user clicks the submit lead button, the "Thank you" opens in a new tab, and the lead itself is replaced by your link after a specified number of milliseconds. Use it for domonetization, for example: {_formblank:https://yellowweb.top,3000}
Macros #6: Making a Proclus Land!
And for dessert: remember "The Tale of the Lost Form of the Moneycrafter"? In it, Constantine described a "universal" form for quickly making proclays-lands. So, I took this form and made it into a macro! The macro has 9 parameters:
- The name of the file that sends leads to your PP, for example: order.php
- Name of the hidden form field where the unique click identifier will be written Keitaro (subid), for example: sub1
- The name of the hidden form field where the fbet pixel identifier will be written, for example: px
- The serial number of the submetric Keitarofrom which the pixel ID will be taken, for example: 4
- The color of the form in hexadecimal coding, for example: aabbaa
- The title of the form, for example: Get Reduslim!
- The word "name" in the language of GEO, for example: Name
- The word "phone number" in the language of GEO, for example: Phone
- The inscription on the "Order" button, for example: Order Now
Put it all together and you get something like this: {_form:order.php,sub1,px,4,aabbaa,Our Great Product,Name,Phone,Order Now!}
The form itself looks something like this:
You can, of course, open the macro code and adjust the styles however you want. See the source code of the added form:
We see that there is everything we need: subid Keitaro in the sub1 field, pixel fb to roll on Thanks, and the macro also adds the current click country to the country field!
Oh, and by the way, the links that are on the procle do NOT need to be changed! The macro has a built-in script that will change them all to a smooth scroll to the order form.
Now all you have to do to make a procland is:
- Take a lead sending file from any lead, like order.php
- Also take the "Thank you" page and its style file
- Insert macro!
Create your own macro from any script
Now a little bit about creating a custom macro. Go to /var/www/keitaro/application/macros and see the example.php file there. Copy it to your disk and rename it as your macro will be called, for example yellow.php. Then open the file in any text editor with code highlighting, I prefer Notepad++.
We change the name of the class as well as the name of the file (in my case it is yellow) and delete everything between curly brackets in the process function. It turns out like this:
Now take your favorite script and replace all the double quotes inside it with single ones. For me, it will be a script like this:
<script>console.log('Yellow Web rules!');</script>
Then it remains to enclose our script in double quotes, put a semicolon at the end and write return before it, and shove all this stuff inside the process function:
That's it! Now into any site inside Keitaro I can add a macro {_yellow} and after clicking on it to see in the console the inscription Yellow Web rules!
If you've managed a simple script and want to make a macro with parameters, see how it's done in any of mine, I think you'll figure it out!
Debugging macros
If you're like this, you've added my macros, you go to the site and you see a picture like this:
then most likely you haven't passed ALL the parameters you wanted into the macro.
If instead of a macro you see a mishmash of code directly in the browser, then you have clearly forgotten to add the following to the beginning of the macro name underlining!
Conclusion
Custom macros are useful and handy! Post in the comments if you have ideas for new macros, or if you've made one yourself - send it to me in the PM - we'll put it out to the public.
Good luck with your macro building and ley in the plus side!
Уведомление: Maximizing Profits Using the Keitaro Multi-Handed Bandits Algorithm | Yellow Web
Daniel hi. Tell me, you have a macro cdate.php - what is it for? There are some macros, which I want to try to write for tracker(e.g. the output of the name of the offer/the link to be sent to s2s and the date of click/conversion in the time zone tracker. cdate - is that him by any chance?
Hi, no, the macro is not for that, but for displaying the current date somewhere in the comments of the feed, for example. And for your task it seems that there was a built-in macro.
Hello, please advise on the relevance of macros. I have for some reason they do not work (.
Keitaro 9.13.9 - Flight is normal
"Steal Proclu" doesn't work. What could be the problem?
Well, you write down what "doesn't work" and what you did, what's in the log Keitaro etc.
Hi
Thank you very much for the macros. Could you please advise me, I uploaded the first macro ( disablecopy ) to the server, then I added in the html code of the landings right after : {_disablecopy} as mentioned in the article, the macro itself does not work
Can you help me, please?
Does it work for Keitaro 10.1.7?
macros should work always and everywhere, write to @dvygolov - we'll figure it out.
Hi) in the current realities of working with fb with offers placed not on your side is becoming more and more relevant issue of working with server pixel api. Such materials, of course, are already walking in arbitration publishers, but I am interested in another point: when passing s2s postback from keitaro In FB, you can throw in a lot of parameters, whether it's the user's email or ipi. But some require sha256 hashing for transmission.
I'm writing this in the hope that you might be interested in writing a macro that allows you to hash some variable from tracker))
I support, faced the same problem, all personal data FB does not accept without hashing.
macro for hashing is already on GitHub)
Hi, added this macro for sha256, that's what it's called, enjoy)
Can you tell me if you can put code in a macro to send a postback to upflare? I understand that it's a crutch, but a normal postback won't work, because you can't put together a normal post request there, for example add a header for authentication
In general, yes, you can put JS code in the macro that will send a postback.
Уведомление: Increase the CR of the banding!
Hi, thanks a lot for the macros and explanations! Could you please tell me, I uploaded the first macro ( disablecopy ) to the server, then I added in the html code of the landing page right after : {_disablecopy} as instructed in the instructions. The problem is that the macro doesn't work, and the text itself ( : {_disablecopy} is displayed on the landing page and breaks the layout. Please tell me how to solve this problem ?
Hi, you probably put the macro somewhere wrong. Message me on tg https://t.me/dvygolov and send a screenshot with a piece of html code where you can see the inserted macro.