Most likely, you are using a caching plugin (for instance, W3 Total Cache). In that case, enable Ajax in the AdHerder options screen.
AdHerder tracks the user behavior through a cookie. Based on this data the ad is selected as follows: An ad that has not been seen by the user has the highest priority. An ad on which the user has already converted (clicked) has the lowest priority. You can tweak this behavior in the settings screen.
The plugin automatically tracks clicks on links with a small piece of JavaScript.
If you want to monitor different types of conversion, you need to manually
call the adherder_track_conversion() function with as argument the ID of the ad.
To find the ID of the call you can open the reports page and check the table.
The first column shows the id. Another option is to edit the call and look
at the url: /wp-admin/post.php?post=7&action=edit. In this case, the id is 7.
Tracking Twitter conversions (this only tracks people who click on follow and weren't already following you). Use the following code:
<a href="<your twitter url>" class="twitter-follow-button" data-show-count="false">Follow me</a>
<script type="text/javascript">
jQuery.getScript("//platform.twitter.com/widgets.js", function() {
twttr.events.bind('follow', function(event) {
adherder_track_conversion(<ad-id);
});
});
</script>
Don't forget to replace:
*
Mailchimp signup tracking (tracks every one who receives the signup configuratin mail, but can be changed to track any one who clicks on the submit button):
Copy the code into a new call
Note: by default the latest version of WordPress comes with jQuery in "no conflict" mode. This is not compatible with the Mailchimp signup form. To fix this, you need to replace every occurence of $ in the form with jQuery (capitalization is important)
function mce_success_cb(resp) It is in the lower part of the signup codeif (resp.result=="success"){Just below this line add the tracking code:
if (resp.result=="success") {
adherder_track_conversion(<call-id>);
...
Save the changes
In order to track Facebook likes, you need to use the XFBML version of the like button. Use the following code when creating your ad:
<div id="fb-root"></div>
<fb:like send="false" layout="button_count" width="200" show_faces="true"></fb:like>
<script type="text/javascript">
jQuery.getScript('<facebook script url>', function() {
FB.init({ status: true, cookie: true, xfbml: true });
FB.Event.subscribe('edge.create', function(response) {
adherder_track_conversion(<ad-id>);
});
});
</script>
You may need to change the "fb:like" section to suite your preferences. The easiest way to get it right is to get the code from: http://developers.facebook.com/docs/reference/plugins/like/
Yes you can. It is possible to override the automatic selection of ads.
Add a adherder_ad parameter to the request. For instance, show the add with id 10:
http://yoursite/?adherder_ad=10
Want a nice button to do this more easily? Ask Tristan@grasshopperherder.com