mmm cookies
I am currently dropping cookies using this method:<img src="http://www.xxx.com/go/xxx" alt="" width="1" height="1" />where /go/xxx is my gocodes wordpress plugin redirection. I only have a few affiliate accounts and so far I have not been pulled up on it. They're probably glad of the sales!Do you think I'm OK continuing this way or could I work smarter? I seriously recommend something else. The page where you want to drop the cookies on - add a .htaccess file in your domain-root that says:RewriteEngine ON
RewriteRule ^footer-bottom.png$ http://www.your-affiliate-link.com/ Head over to your stylesheet, add:.footer_bottom {
background-image:url(http://www.your-url.com/footer_bottom.png)
}Now edit your Template, and add following code to your footer-code:
PHP Code:<div class="footer_bottom"></div> Weee! No red "X" saying that this image doesn't exist, since it's loaded via the stylesheet, people will just not see it. :p
Best Regards OK, thanks Nuls, I'll test it later and let you know if I have any problems.:thumb: nice, i used to only do the mod_rewrite stuff without css.. Here's my modified .htaccess file where xxx is the uncloaked affiliate link:# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
RewriteRule ^footer-bottom.png$ http://www.xxx.com/xxxx/
</IfModule>
# END WordPressI have edited the stylesheet and footer as shown.
1 - how do I verify it works? I assume I should still get clicks on my aff stats?
2 - how do I add extra lines to the .htaccess file for all my other affiliate links? You could d/l fire cookie for firebug, and monitor the cookies dropped. Thanks, I think one way or another I can verify the cookies loading. I just need to know how to handle multiple cookies?
cheers
Here is my code again;# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
RewriteRule ^footer-bottom.png$ http://www.xxx.com/xxxx/
</IfModule># END WordPress You'd need to set up different RewriteRules for any cookie, this was exactly the reason why I've made TCL, it pretty much sucks doing that manually on different domains.
i.e.RewriteRule ^footer-bottom.png$ http://www.xxx.com/xxx/
RewriteRule ^another-footer.png$ http://www.xxx2.com/xxx/ Now you'd need to create another div-class in your stylesheet and then randomly pick one of each in your template. oh, man! now I need to save up for TCL :mad: Was there a discount offer?
Tell you what though... I noticed that using the<img src="http://www.xxx.com/go/xxx" alt="" width="1" height="1" />actually loads a lot of the merchant site files, not just the aff cookie! Removing it has halved my page load time! Also I am now using Hyper Cache which has helped a lot too. Perhaps I'll make some more sales from the more impatient visitors now! Never ever use <img src>, AM will notice that, because, as you have already seen yourself, much stuff is being loaded. Doing it the "CSS Way" will not trigger these issues.
Coupon -> http://www.thecookielabs.info/?r=Larceny
Best Regards Thanks Nuls - it'll be an early birthday present! Hi Larceny and Nuls! TCL purchased - awaiting download details, cheers! .footer_bottom {
background-image:url(http://www.your-url.com/footer_bottom.png) is the your-url.com my domain url or the affiliate offer url hat is YOUR domain/footer-bottom.png which doesn't really exist.. but yeah, add your domain there...
页:
[1]