Le Kevin dot com

photographic-poetic-musical horizon

Browsing Posts in SEO – Urchin 6

In the event that Urchin needs to be moved from one server to another, all its configuration and report data will need to be migrated. Follow the steps below to ensure that everything gets moved over smoothly and working on the new server:

  1. Move Urchin Configuration Database
  2. Install Urchin 6 on the new server
  3. Move report data
  4. Move custom files and templates
  5. Modify custom settings
  6. Verify new setup
  7. Request Urchin Serial Reset

1. Move Urchin Configuration Database

Backup your existing Urchin configuration database using one of the following methods:

MySQL
mysqldump –u {username} –p {database} > urchin_bak.sql

PostgreSQL
pg_dump -p {database port} -U {username} {database} > urchin_bak.sql

Next, create the Urchin database on the new server: Click here for instructions. Finally, import the configuration database to the new server.

MySQL
mysql –u {username} –p {database} < urchin_bak.sql

PostgreSQL
psql –h –p {port} -U {username} {database} < urchin_bak.sql

2. Install Urchin 6 on the new server

See this link for help. Make sure to uncheck “Delete and recreate Urchin specific database tables if they exist” during a Windows installations or answer NO to “Would you like to initialize the configuration database during install?” for Linix installations.

3. Move Report Data

By default, the Urchin report data files are stored under urchin/data. If this is the case with your installation, copy all the contents from old/server/urchin/data to new/server/urchin/data. If your data files are stored in a custom location, you may copy them wherever you like, but be sure to follow step 5.

4. Move custom files and templates

Any customizations made in Urchin are generally kept in the urchin/lib/custom directory. Make a backup of this entire ‘custom’ directory and restore it in urchin/lib/custom on the new Urchin server.

5. Modify custom settings

If any changes were made to the following files, be sure to replicate the customizations on the new Urchin server:

  • /etc/session.conf
  • /etc/urchin.conf
  • /var/urchinwebd.conf

6. Verify new setup

Run urchin/util/inspector to check the new Urchin 6 setup. If any permission errors were encountered, run inspector -r

7. Request Urchin Serial Reset

Complete this form to request an Urchin serial reset. Once the serial has been reset, start the Urchin services (urchin/bin/urchinctl start), navigate to the Urchin interface, and follow the steps to reactivate your license.

via: http://www.urchintools.com/urchin6/advanced-techniques/how-to-move-or-migrate-urchin-to-a-new-server

Initialize page tracking with the functions below.

Function Old Style New Style
Account to track.
Identifies the account number in which the page should be tracked.
_uacct _gat._getTracker(urchinAccount)
Track the page.
Sends the page tracking data to the Google servers.
urchinTracker(); _trackPageView(opt_pageURL)

Together, the Initialization and Page Tracking functions should look like the code shown below.

Old Style New Style

<script type="text/javascript">
_uacct = "UA-XXXXX-X";
urchinTracker();
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._trackPageview();
</script>


Control data collection settings

Back to Top

By default Google Analytics will track a set of data elements, such as Flash versions and web browser information. You have the option to turn this detection off by using the functions listed below, but remember – once you do so, you will lose the data permanently.

Control the amount of information you collect by using the functions listed below.

Function Old Style New Style
Collect browser attributes.
Sets the browser tracking module. Controls collection of browser attributes. You can also learn how to disable client tracking for certain pages.
_ufsc _setClientInfo(enable)
Detect Flash version.
Sets the Flash player version detection flag.
_uflash _setDetectFlash(enable)
Detect the page title.
Sets the title detection flag. Learn how to configure GA to ignore titles.
_utitle _setDetectTitle(enable)

Together, the control data collection settings functions should look like the code below.

Old Style New Style

<script type="text/javascript">
_uacct = "UA-XXXXX-X";
_ufsc = 0; // track browser info
_uhash = off; // cookie integrity checking using hashes
_uflash = 0; // detect Flash version
_utitle = 0; // track title in reports
urchinTracker();
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setClientInfo(false);
pageTracker._setAllowHash(false);
pageTracker._setDetectFlash(false);
pageTracker._setDetectTitle(false);
pageTracker._trackPageview();
</script>


Tracking Subdomains and Third-Party Sites

Back to Top

Track a visitor across a site or multiple sites using links or forms with the functions listed below.

Function Old Style New Style
Share cookies with another domain via HREF or GET.
Passes the cookies from visited site to another via query string parameters.
__utmLinker(this.href); _link(targetUrl)
Share cookies with another domain via POST.
Passes the cookies from visited site to another by adding 0query string parameters in a POST form request.
__utmLinkPost(this); _linkByPost(formObject)
Enable linking to another domain.
Sets the linker functionality flag.
_ulink _setAllowLinker(true or false)
Determine the domain for the tracking cookies.
Use when linking across subdomains or to other domain names.
_udn _setDomainName(newDomainName)

The table below shows what the code will look like when you track multiple sites using a link versus a form.

Tracking method Old Style New Style
Using a link

<script type="text/javascript">
_uacct = "UA-12345-1";
_udn = "none";
_ulink = 1;
urchinTracker();
</script>
...
<a href="http://newsite.com/test.html"
onclick="__utmLinker('http://newsite.com/test.html'); return false;">click me</a>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script>
...
<a href="http://newsite.com/test.html"
onclick="pageTracker._link('http://newsite.com/test.html'); return
false
;">click me</a>

Using a form

<script type="text/javascript">
_uacct = "UA-12345-1";
_udn = "none";
_ulink = 1;
urchinTracker();
</script>
...
<form name="f" method="post" onsubmit="__utmLinkPost(this)">
...
</form>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script>
...
<form name="f" method="post" onsubmit="pageTracker._linkByPost(this)">
...
</form>


E-Commerce Transaction Tracking

Back to Top

Track sales revenue and measure success with the funtions below.

Function Old Style New Style
Add a new item to an e-commerce transaction.
The data in each item line follows a pipe (|) separated list.
UTM:I|order-id|product name|category|total|quantity _addItem(orderId, sku, productName, variation, unitPrice, quantity)
Add a new e-commerce transaction to track.
The data in each transaction line follows a pipe (|) separated list.
UTM:T|order-id|affiliation|total|tax|shipping|city|state|country _addTrans(orderId, store, total, tax, shippingFee, billingCity, billingState, billingCountry)
Send transaction and item data to Google.
Use after all the items are added to the transaction.
__utmSetTrans(); _trackTrans()

Use the code below on your receipt page to track your e-commerce transactions.

Old Style New Style

<script type="text/javascript">
_uacct = "UA-12345-1";
urchinTracker();
</script>
<form name="utmform" id="utmform">
<textarea name="utmtrans" id="utmtrans" style="display:none">
UTM:T|1234|Mountain View|11.99|1.29|5|San Jose|California|USA
UTM:I|1234|DD44|T-Shirt|Green Medium|11.99|1

</textarea>
</form>
<script type="text/javascript">
__utmSetTrans();
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._trackPageview();
pageTracker._addTrans(
"1234", // order ID - required
"Mountain View", // affiliation or store name
"11.99", // total - required
"1.29", // tax
"5", // shipping
"San Jose", // city
"California", // state or province
"USA" // country
);
pageTracker._addItem(
"1234", // order ID - required
"DD44", // SKU/code
"T-Shirt", // product name
"Green Medium", // category or variation
"11.99", // unit price - required
"1" // quantity - required
);
pageTracker._trackTrans();
</script>


Campaign Tracking

Back to Top

Configure your Google Analytics to track your campaigns using the functions shown below.

Function Old Style New Style
Set campaign tracking flag.
Activates campaign tracking module.
_uctm _setCampaignTrack(enable)
Set campaign content key.
Parses campaign content from URL. Use this information to create A/B tests with our free Website Optimizer tool.
_ucct _setCampContentKey(newCampContentKey)
Set the campaign ID key.
Use to parse campaign ID from URL.
_ucid _setCampIdKey(newCampIdKey)
Set the campaign medium key.
Use to parse campaign medium from URL.
_ucmd _setCampMediumKey(newCampMedKey)
Set the campaign name key.
Use to parse campaign name from URL.
_uccn _setCampNameKey(newCampNameKey)
Set the campaign no-override key.
Use to parse campaign no-override value from URL.
_ucno _setCampNOKey(newCampNOKey)
Set the campaign source key.
Use to parse campaign source from URL.
_ucsr _setCampSourceKey(newCampSrcKey)
Set the campaign term/keyword key.
Use to parse campaign term or keyword from URL. Should be used to track paid search advertising.
_uctr _setCampTermKey(newCampTermKey)
Set allow anchor usage flag for campaigns.
When enabled, uses # instead of the default ? to separate the request stem from the query string.
_uanchor _setAllowAnchor(enable)

Try tracking campaigns with custom field names. Pass these names to the campaign functions on your landing pages so that Google Analytics can recognize your campaign information from your manually tagged URLs.

Old Style New Style

<script type="text/javascript">
_uacct = "UA-12345-1";
_uccn = "ga_campaign"; // name [default: utm_campaign]
_ucmd = "ga_medium"; // medium [default: utm_medium]
_ucsr = "ga_source"; // source [default: utm_source]
_uctr = "ga_term"; // term/keyword [default: utm_term]
_ucct = "ga_content"; // content [default: utm_content]
_ucid = "ga_id"; // id number [default: utm_id]
_ucno = "ga_nooverride"; // don't override [default: utm_nooverride]
urchinTracker();
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._setCampNameKey("ga_campaign"); // name
pageTracker._setCampMediumKey("ga_medium"); // medium
pageTracker._setCampSourceKey("ga_source"); // source
pageTracker._setCampTermKey("ga_term"); // term/keyword
pageTracker._setCampContentKey("ga_content"); // content
pageTracker._setCampIdKey("ga_id"); // id number
pageTracker._setCampNOKey("ga_nooverride"); // don't override
pageTracker._trackPageview();
</script>


Customizations: Sources

Back to Top

Set keyword or referrer ignore preferences, or add new organic search engines to track.

Function Old Style New Style
Add new ignored organic keyword.
List of keywords to ignore. Learn how you can treat certain referral sources as direct traffic.
_uOno[] _addIgnoredOrganic(newIgnoredOrganicKeyword)
Add new ignored referrer.
List of referral domains to ignore.
_uRno[] _addIgnoredRef(newIgnoredReferrer)
Add new organic search engine to track.
List of organic search engines to match automatically in referrals.
_uOsr[]
_uOkw[]
_addOrganic(searchEngine, queryVariable)

Look at the code below to see how you can configure Google Analytics to set ignore preferences and add organic search engines.

In the example below, note that “41″ is within the brackets for the “add organic” functions. This number may change as Google Analytics is constantly adding more properties to its list of referred search engines. To see an up-to-date list, please visit http://www.google-analytics.com/urchin.js and change the number in the brackets within your urchin.js code accordingly.
Old Style New Style

<script type="text/javascript">
_uacct = "UA-12345-1";
_uOno[0] = "ignore"; // keyword to treat as referral
_uRno[0] = "urchin.com"; // referral to treat as direct
_uOsr[41] = "new_search_engine"; // new search engine to treat as referral
_uOkw[41] = "query"; // keyword query parameter for new search engine

urchinTracker();
</script>

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._addIgnoredOrganic("ignore");
pageTracker._addIgnoredRef("urchin.com");
pageTracker._addOrganic("new_search_engine","q")
;
pageTracker._trackPageview();

</script>


Customizations: Cookies

Back to Top

Reset and control your cookies so they serve your unique business needs.

Function Old Style New Style
Set flag to allow domain hash.
Create a unique domain hash (or numerical representation) of the domain name, which is then put into cookies. Look at controlling data collection settings to see how this is supposed to be implemented into the code.
_uhash _setAllowHash(true or false)
Set new default cookie path.
Controls the path in the request used to determine what cookies are (re)set and delivers to the requesting site. By default, Google Analytics sets the cookie path to /. If you would like to change this, send your preferred cookie path to the _setCookiePath function.
_utcp


<script type="text/javascript">
_uacct = "UA-12345-1";
_utcp = "/path/of/cookie/";
urchinTracker();
</script>

_setCookiePath(newCookiePath)

….
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setCookiePath("/path/of/cookie/");
pageTracker._trackPageview();
</script>

Set new default cookie expiration time.
Set the campaign tracking cookie timeout in seconds. Google Analytics credits the most recent campaign if conversion happens within six months, but you customize the timeout by sending the desired number of seconds to the _setCookieTimeout function.
_ucto


<script type="text/javascript">
_uacct = "UA-XXXXX-X";
_ucto = "31536000"; // the number of seconds in 1 year
urchinTracker();
</script>

_setCookieTimeout(newDefaultTimeout)


<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setCookieTimeout("31536000");
pageTracker._trackPageview();
</script>

Set the new session timeout in seconds.
The standard session timeout is 30 minutes, but you can customize it to what works for your business. Please use this function carefully since this very important setting is used to compute visits.
_utimeout


<script type="text/javascript">
_uacct = "UA-12345-1";
_utimeout = "3600"; // the number of seconds in 1 hour
urchinTracker();
</script>

_setSessionTimeout(newTimeout)


<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setSessionTimeout("3600");
pageTracker._trackPageview();
</script>

Set user defined value.
Set the visitor segmentation cookie to help classify the types of visitors coming to your site. For example: new customer vs. prospect, or cat owner vs. dog owner.
__utmSetVar(newVal);


<script type="text/javascript">
_uacct = "UA-12345-1";
urchinTracker();
__utmSetVar("test_value");
</script>

_setVar(newVal)


<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._trackPageview();
pageTracker._setVar("test_value");
</script>

Get the session ID.
Return the session ID from the __utma cookie.
__utmVisitorCode(); _visitCode()

Customizations: Using a Local Server

Back to Top
Function Old Style New Style
Set the new local GIF path.
Set the file system path to the __utm.gif file.
_ugifpath _setLocalGifPath(newLocalGifPath)
Set operation in both local and remote server mode.
Sends data to both Google Analytics backend server and local server. Local server path is determined by _setLocalGifPath() value. Please note that you can track Google Analytis and Urchin software by calling this function in the tracking code.
_userv = 2;


<script type="text/javascript">
_uacct = "UA-12345-1";
_userv = 2;
urchinTracker();
</script>

_setLocalRemoteServerMode()


<script type=”text/javascript”>
var pageTracker = _gat._getTracker(“UA-12345-1″);
pageTracker._setLocalRemoteServerMode();
pageTracker._trackPageview();
</script>

Set operation in local server mode.
Sends data to a local server. Path to local server is determined by _setLocalGifPath() value.
_userv = 0; _setLocalServerMode()
Set operation in remote server mode.
Sends data to Google Analytics backend server.
_userv = 1; _setRemoteServerMode()

https://www.google.com/analytics/settings/check_status_profile_handler?id=1968019

If you are looking for the examples of URL rewriting then this post might be useful for you. In this post, I’ve given five useful examples of URL rewriting using .htacess. If you don’t know something about url rewriting then please check my older post about url rewriting using .htaccess.

Now let’s look at the examples

1)Rewriting product.php?id=12 to product-12.html

It is a simple redirection in which .php extension is hidden from the browser’s address bar and dynamic url (containing “?” character) is converted into a static URL.

RewriteEngine on
RewriteRule ^product-([0-9]+)\.html$ product.php?id=$1

2) Rewriting product.php?id=12 to product/ipod-nano/12.html

SEO expert always suggest to display the main keyword in the URL. In the following URL rewriting technique you can display the name of the product in URL.

RewriteEngine on
RewriteRule ^product/([a-zA-Z0-9_-]+)/([0-9]+)\.html$ product.php?id=$2

3) Redirecting non www URL to www URL

If you type yahoo.com in browser it will be redirected to www.yahoo.com. If you want to do same with your website then put the following code to .htaccess file. What is benefit of this kind of redirection?? Please check the post about SEO friendly redirect (301) redirect in php and .htaccess.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^optimaxwebsolutions\.com$
RewriteRule (.*) http://www.optimaxwebsolutions.com/$1 [R=301,L]

4) Rewriting yoursite.com/user.php?username=xyz to yoursite.com/xyz

Have you checked zorpia.com.If you type http://zorpia.com/roshanbh233 in browser you can see my profile over there. If you want to do the same kind of redirection i.e http://yoursite.com/xyz to http://yoursite.com/user.php?username=xyz then you can add the following code to the .htaccess file.

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1

5) Redirecting the domain to a new subfolder of inside public_html.

Suppose the you’ve redeveloped your site and all the new development reside inside the “new” folder of inside root folder.Then the new development of the website can be accessed like “test.com/new”. Now moving these files to the root folder can be a hectic process so you can create the following code inside the .htaccess file and place it under the root folder of the website. In result, www.test.com point out to the files inside “new” folder.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^test\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteCond %{REQUEST_URI} !^/new/
RewriteRule (.*) /new/$1

Popularity: 82%

via: http://roshanbh.com.np/2008/03/url-rewriting-examples-htaccess.html

So my company today got the final release of urchin 6.4. It’s exelent softwares with some many features.

Evenything seem to work. However, UNC configuration is the only problem. It returns

Error  Goal 3 (3)

To download trial version got to http://www.google.com/urchin/download.html

Blog WebMastered by All in One Webmaster.