21 Feb 2014

How to Create Wordpress Multisite?

>As of WordPress 3.0, you have the ability to create a network of sites by using the multisite feature.

Step 1: Prepare Your WordPress

Your existing WordPress site will be updated when creating a network.

Unless this is a fresh install and you have nothing to lose, please backup your database and files.

Verify that Pretty Permalinks work on your single WP instance.

Also deactivate all active plugins. You can reactivate them again after the network is created.


Step 2: Allow Multisite

Open up >site root folder Edit wp-config.php and add this line above where it says /* That's all, stop editing! Happy blogging. */. If it doesn't say that anywhere, then add the line somewhere above the first line that begins with require or include:

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );

You will need to refresh your browser to continue.

Step 3: Installing a Network

open: Administration > Tools > Network Setup.

You must choose one or the other. You can reconfigure your network to use the other choice after installation, despite the advice on the screen, but reconfiguring it might not be easy.

You only need wildcard DNS for on-demand domain-based sites, despite the advice that may be on the screen.

Once more: See Before You Create A Network.

Sub-domains — a domain-based network in which on-demand sites use subdomains
Sub-directories — a path-based network in which on-demand sites use paths
Network Details

These are filled in automatically, but you can make changes.

Server Address
The domain of the URL you are using to access your WordPress installation.
Network Title
The title of your network as a whole.
Admin E-mail Address
Your email address as super admin of the network as a whole.

Double-check the details and press the Install button.

Step 4: Enabling the Network

Back up your existing wp-config.php and .htaccess files, unless this is a fresh install and you have nothing to lose.

There are two steps:
1. Add the specified lines to your wp-config.php file
The extra lines go just after where you added the line in Step 1: Prepare Your WordPress.
2. Add the specified lines to your .htaccess file
If you do not have a .htaccess file, then create it in the same directory as your wp-config.php file.
If you ALREADY have a .htaccess file, replace any existing WP lines with these new ones.
In some cases you might also have to add Options FollowSymlinks at the start of the file.

After completing these steps, log in again using the link provided. You might have to clear your browser's cache and cookies in order to log in.

Step 5: Network Admin Settings


At the left of your WordPress toolbar, My Sites is now the second item. There, all your sites are listed, with handy fly-out menus, as well as a Network Admin menu item. Under Network Admin you can use the Dashboard item to go to the Network Dashboard screen.




6 Feb 2014

Google Ecommerce Tracking

Enable Ecommerce tracking

  1. Login into Analytics.
  2. Click Admin from the menu bar at the top of any screen in Analytics.
  3. Use the drop down menus to select the AccountProperty, and View.
  4. Click View Settings.
  5. In the Ecommerce Settings section, click the toggle so it says ON
  6. Click Save at the bottom of the page.

Before Google Analytics can report ecommerce activity for your website, you must enable ecommerce tracking on the view (profile) settings page for your website. After that, you must implement the ga.js ecommerce tracking methods in your shopping cart pages or through your ecommerce software. The collection of ecommerce methods work together to send each user's transaction information to the Google Analytics database as it occurs. In this way, Analytics can link a specific referral source to a conversion or purchase. Most template-driven ecommerce engines can be modified to include this information hidden in the order confirmation page.


More Info:

https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingEcommerce

https://support.google.com/analytics/answer/1009612?hl=en



Google Analytics

How do I use Analytics?

You can use Analytics to track a variety of web-based content.
  • Tracking multiple websites
    Google Analytics will track as many websites as you own! We've provided multiple reporting views in your account, so you can view individual reports for specific domains or subdomains.
  • Tracking your blog, MySpace, or Facebook pages
    To use Google Analytics to track your pages on Facebook, MySpace, WordPress or other solutions, we recommend that you search for 3rd-party widgets that simplify the Analytics set up for pre-defined site templates. You may not be able to use Analytics on sites where you cannot edit the page code (such as on MySpace, for example). However, often you will be able to find plugins or widgets that will help you use Analytics in your page.
  • Tracking visits from RSS feeds
    In order for Google Analytics to track data, it is necessary that the Google Analytics tracking code gets executed. Since most RSS/atom readers cannot execute JavaScript, Analytics will not count pageviews that are loaded through an RSS reader. Analytics requires that the visitor execute a JavaScript file on Google's servers in order to track that pageview.
  • Using Analytics with other web analytics solutions
    You can run Google Analytics in parallel with any third-party or internal solution you've already deployed.

How to create a /robots.txt file

Where to put it

The short answer: in the top-level directory of your web server.

The longer answer:

When a robot looks for the "/robots.txt" file for URL, it strips the path component from the URL (everything from the first single slash), and puts "/robots.txt" in its place.

For example, for "http://www.example.com/shop/index.html, it will remove the "/shop/index.html", and replace it with "/robots.txt", and will end up with "http://www.example.com/robots.txt".

So, as a web site owner you need to put it in the right place on your web server for that resulting URL to work. Usually that is the same place where you put your web site's main "index.html" welcome page. Where exactly that is, and how to put the file there, depends on your web server software.
Remember to use all lower case for the filename: "robots.txt", not "Robots.TXT.

What to put in it

The "/robots.txt" file is a text file, with one or more records. Usually contains a single record looking like this:
User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /~joe/
In this example, three directories are excluded.

Note that you need a separate "Disallow" line for every URL prefix you want to exclude -- you cannot say "Disallow: /cgi-bin/ /tmp/" on a single line. Also, you may not have blank lines in a record, as they are used to delimit multiple records.

Note also that globbing and regular expression are not supported in either the User-agent or Disallow lines. The '*' in the User-agent field is a special value meaning "any robot". Specifically, you cannot have lines like "User-agent: *bot*", "Disallow: /tmp/*" or "Disallow: *.gif".
What you want to exclude depends on your server. Everything not explicitly disallowed is considered fair game to retrieve. Here follow some examples:
To exclude all robots from the entire server
User-agent: *
Disallow: /

To allow all robots complete access
User-agent: *
Disallow:
(or just create an empty "/robots.txt" file, or don't use one at all)
To exclude all robots from part of the server
User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /junk/
To exclude a single robot
User-agent: BadBot
Disallow: /
To allow a single robot
User-agent: Google
Disallow:

User-agent: *
Disallow: /
To exclude all files except one
This is currently a bit awkward, as there is no "Allow" field. The easy way is to put all files to be disallowed into a separate directory, say "stuff", and leave the one file in the level above this directory:


User-agent: *
Disallow: /~joe/stuff/

Alternatively you can explicitly disallow all disallowed pages:
User-agent: *
Disallow: /~joe/junk.html
Disallow: /~joe/foo.html
Disallow: /~joe/bar.html