How to configure PBase statcounter variables

July-10-2007:PBase allowed users to incorporate statcounter code to their galleries. Statcounter is a statistic tool that provides a wealth of information about who visits your site (much richer in content than PBase's own stats.pbase.com implementation). Using the PBase provided mechanism is much simpler than having to manually insert statcounter code in each gallery (which won't work anyway, as of now, since PBase has disabled user-insertable javascript code)

This guide shows you how to set it up.

(To see how to configure Google analytics instead of statcounter click here)

SUGGESTION: Don't stuff 'em all if you don't need to

Even though PBase has allowed you to add a variety of statistic/analytics tools, it does not mean you add them all. Each option you enable results in an additional javascript file to be loaded, which adds to the delay of your pages loading up

Note : When you enable statcounter using PBase, it is applied to ALL your pages & galleries - it is a global setting.

STEP 1: Inspect your existing statcounter code

Take a look at your statcounter code that you already have. I am assuming you know how to see this statcounter code (typically available after logging into statcounter.com or, simply, by looking at the code you may have already inserted in your PBase galleries previously). The code looks something like this:

You only need to concentrate on the items in yellow. Forget the rest.

STEP 2: Inspect your existing statcounter code

Log into pbase. And go to your pbase.com/account page

STEP 3: Add the statcounter settings and Update

Once you go to the previous page, scroll down to the 3rd party plugins section. All you need to do here is enter the values as shown in the image below. Hit Update after that.

THAT'S IT

Now, to check if it is working, just go to any page of your galleries and do a View→Source. At the bottom, you should see an autogenerated statcounter code. Note that this is only visible when you View→Source (it will not be visible in your gallery pages when viewed normally).

Also note that PBase only supports invisible counters - so even if your statcounter account has your code configured to show a visible counter on your pages, this will be invisible when you do it with PBase

Issues

If you face issues, make sure you have entered the right values. If you think you have the right values, post in the HTML forum of forum.pbase.com. If that fails, ask PBase support

Limitations

Only 1 project for all your galleries

If you already use statcounter you may already know this, but just in case you did not, statcounter has the concept of 'projects'. For example, let's say you owned two different sites www.foo.com and www.bar.com, you could specify them as different projects and statcounter would generate different code for them, so they could be tracked independantly (for example, you may not want hits mixed between foo.com and bar.com). The same applies to different sections in the same domain. For example, let's say my PBase ID was www.pbase.com/arjunrc. In the manual method of inserting statcounter code for each page, I could add different code for different galleries, thereby, creating a unique hit tracker for say, www.pbase.com/arjunrc/gallery1 and www.pbase.com/arjunrc/gallery2. With the PBase method described above, this is not possible. You need to specify only ONE project id (the “var sc_project” value in STEP 1). This same project ID will be used across all your sub galleries for your account.

No "Visible" counter

As described earlier, you cannot have a 'visible' counter in your galleries. It will only be viewable when you log into statcounter.com. It does not matter how you have configured statcounter - PBase overrides it.