WebGUI
      Click here to register.
      
Sprechen Sie WebGUI? Parlez vous WebGUI? Se habla WebGUI? Spreekt u WebGUI?

Do you speak WebGUI? Please help us translate WebGUI into your language.


Scratch Macro

User: snapcount
Date: 10/11/2007 9:21 pm
Views: 496
Rating: -9    Rate [
|
]

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... 

 



Replies

PreviousBackNext