There are many reasons a dog will scoot across the floor, dragging his anus (and possible a brown streak) down the center of your new carpeting. The most common, in order, are:
1) The anal glands are full and are creating discomfort. A trip to your vet or the groomer is advised to express the anal sacs and relieve the pressure. While the anal glands are normally expressed during a bowel movement, some dogs – especially small dogs – do not fully extend the anus, thus the elimination of the anal sac does not occur.
2) The dog has worms (tape worm or strongids are the most common) You can tell if worms is the cause of the anal discomfort by lifting the tail and observing. When a tape worm sheds, it looks like pieces of white rice. The pieces are sticky and can remain on the anal area causing an itchy sensation. Strongids look like spaghetti and can hang from the anal cavity after a bowel movement as they are long and may not have been fully expressed. They can range in color from pale, almost clear to a deep reddish brown.
3) The dog was just groomed and the groomer expressed the anal gland OR the groomer nicked the anus with a clipper. As the anus heals, it becomes itchy for a day or two and you should see this behavior stop.
4) The carpet does not smell like the family and the dog is spreading scent gland around. Although not a common occurrence, it has been known for dogs to scoot across new items like carpets, floors and even clothing left around. The anal sac contain the scent of your dog and if he/she is very territorial, this behavior can occur.