Powered by MediaWiki
Personal tools

Goals

From b2evolution manual

Jump to: navigation, search

This manual page is outdated. NEW PAGE: Goals in b2evolution v5+.

b2evolution 3.x

Goals allow you to track hits on specific links or specific pages.

They are called "goals" because they serve a similar purpose as what is called "goals" in other analytics packages such as Google Analytics.

Contents

[edit] Tracking clicks on a link

For example, if in a blog post you link to http://www.wwf.org/ but you would actually want to know how many people click on this link, then set up a goal with a key of "wwf" and a redirection URL of "http://www.wwf.org/".

[edit] Method 1: with a redirect

Then instead of linking to http://www.wwf.org/ , link to http://yourblog.com/htsrv/track.php?key=wwf . When that URL is loaded, track.php will record the click and immediately redirect (302) to the destination URL specified in the Goal.

[edit] Method 2: with javascript

To be documented.

[edit] Tracking hits on a page

You can also track hits on any page (not even necessarily on your own blog). In that case, leave the redirection URL blank and embed this code on the page you want to track:

[edit] Method 1: with an invisible image

 <img src="http://yourblog.com/htsrv/track.php?key=yourkey" width="1" height="1" />

[edit] Method 2: with javascript

To be documented.

[edit] Viewing results

As b2evolution starts recording hits on your goal, you will see that data appear under "Goal hits" (simple view) and "Stats" (more analytical view, useful when you start having multiple goals).


Note: "default value" is not used yet.