===== How to configure PBase Google Analytics variables ===== July-11-2007:PBase allowed users to incorporate [[http://www.google.com/analytics/|Google Analytics code]] to their galleries. Google Analytics is a very powerful analytics tool that provides a wealth of information about who visits your site, as well as allows you to set conversion goals and more (For example 'how many people visit my "new york" galleries after visiting my "travel" galleries?) (much richer in content than PBase's own stats.pbase.com as well as statcounter and extreme counter. However, if all you want is who visited your site, statcounter and extreme counter do a better job of easily displaying it). Using the PBase provided mechanism is much simpler than having to manually insert analytics 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 Statcounter instead of Google Analytics click [[statcounter|here]]) ** Note **: When you enable Google Analytics using PBase, it is applied to ALL your pages & galleries - it is a global setting. === 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 ** If you already have google analytics tracking your PBase site, jump to STEP 4 ** === STEP 1: Add PBase tracking to your analytics account === Log into google analytics, and click on "Add Website Profile". In this example, you would notice that I am already tracking another personal website but not my PBase account. {{howto:analytics1_1.jpg|}} === STEP 2: Procedure to add your PBase galleries === In the resulting screen, make sure you enter **www.pbase.com/YOURUSERNAME** (replace arjunrc in the screenshot with your own pbase id. Then hit finish. **VERY IMPORTANT** - don't just specify www.pbase.com - it will NOT work. {{howto:analytics2_2.jpg|}} === STEP 3: Inspect the generated code === look for the line that starts with _uacct and copy the value within double quotes (ignore the quote characters) {{howto:analytics3.jpg|}} Just make a note and click Finish. === STEP 4: Add this value to your PBase account === You are now at the stage where google analytics is ready to track your PBase account, but to do so, it will check to see if you really own www.pbase.com/YOURUSERNAME. To prove to google that you own that URL, google will check if you inserted it's required code to that page. You may want to perform Step 4 in a new browser window, because you will need to go back to Google analytics after this. So now, go to www.pbase.com/account (after logging into PBase), and scroll down to the Google Analytics portion and enter the same _uacct value you previously made a note of. Enter that value in this text box as below. And click on the update button on that page (not shown in the image) {{howto:analytics4.jpg|}} At this point, PBase would have generated the required google javascript in your ROOT gallery as well as ALL OTHER SUBGALLERIES. === STEP 5: Verify that google detects the PBase generated code === Now that you have added it to PBase, go back to the google window. You should see a new entry for your pbase galleries. Click on the "Check Status" link {{howto:analytics5.jpg|}} If you entered the right values everywhere you should see {{howto:analytics6.jpg|}} ** THAT'S IT ** === STEP 6: BE PATIENT AFTER THIS === In my experience, it takes anything between 3 hrs - 36 hrs (sometimes more!) for Google to start receiving your data. So don't expect your google counters to start clicking immediately. People love you and are visiting your galleries. Google is just a little slow on the uptake ;-) === Issues === If you face issues, make sure you have entered the right ua_acct value in pbase. If you think you have the right values, post in the HTML forum of forum.pbase.com. If that fails, ask PBase support