plainblack.com
Username Password
search
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.

Example:

Ad 1 URL: www.yoursite.com/offer1?op=setScratch;scratchName=subId;scratchValue=google1

Ad 2 URL:
www.yoursite.com/offer1?op=setScratch;scratchName=subId;scratchValue=google2

Then on /offer1 you have an affiliate link that passes a subId.

www.affiliateLink.foo/?affiliateId=1234&o=^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
http://www.snapcount.org/
- 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.
Comments
DownloadScratch.pm Scratch.pm
LinksNo Support Offered
Statistics Downloads: 438
Views: 2200
Rating: 0
Updated: 10/11/2007
Keywords macros
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved