Username Password
Bookmark and Share

Scratch Macro

This macro allows a user to fetch a scratch value passed in from the URL and use it in content.  This can be useful if you have affiliate links and you want different ads to use specific sub ids for the same affiliate link.


Ad 1 URL:;scratchName=subId;scratchValue=google1

Ad 2 URL:;scratchName=subId;scratchValue=google2

Then on /offer1 you have an affiliate link that passes a subId.^Scratch(subId);

The macro would pass "google1" or "google2" depending on the link that brought them to the page. Now you can track which ads are resulting in conversions (assuming your affiliate program offers subId tracking)

You can also pass a 1 as the second parameter to the macro if you want it to delete the scratch variable after it's displayed.  The macro filters all Javascript and HTML from the value before displaying it so you don't have to worry about XSS or other wickedness. 

Roy Johnson
IRC: snapcount
- Free WebGUI, Perl, Apache, and MySQL tutorials, walk throughs, and articles... 


System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
LinksNo Support Offered
Statistics Downloads: 757
Views: 2980
Rating: 0
Updated: 10/11/2007
Keywords macros
NavigationBack to the Bazaar
© 2022 Plain Black Corporation | All Rights Reserved