Campaign Cords or Campaign Hat Cords are decorations generally worn around a variety of types of serviceman's hats to indicate station, unit, rank or history of service. They are generally used in the military or Police services, and mostly in the United States.
Hat cords were initially used on campaign hats by the military. They were initially used by the US military in the 19th century. Some were of a single colour, others were of a blend of colours, and the patterns of the multi coloured cords could vary. While mainly ornamental and not serving any practical purpose, they could indicate information about the wearer 
Campaign cords are generally made up of three components; the cord itself, the keeper and the acorns. The cord may wrap around the hat twice, while the keeper keeps the cord together, and allows for it to be adjusted for a different size hat.  The acorns are at the end of the cord and are mainly decoration, though obviously serve to stop the cord coming slipping out of the keeper.
Historically, they have been worn by the US military from the mid 19th century in the Indian campaigns, WW1, WW2 to a lesser degree in the pacific theatre, and by Air Cavalry in Vietnam. They are also worn by a number of US police highway patrol and Sheriffs.
Pre World War One campaign cords tended to be of more elaborate construction, with two or three strands making up the one cord, each of a different colour. Post World War One designs tend to be simpler in appearance and just have the one strand.
The colour of the cords could be indicative of the branch of the unit the wearer was with, and also denote rank. In 1941 campaign cords worn by US troops in the pacific had the enlisted men wearing a variety of colours depending on their functions, while officers mixed black and gold cords. Some units found them of no use and discarded them from their uniform 
Campaign cords are worn on service hats worn by US Sheriffs and mainly historically worn on campaign hats by the US military, while the police wear them with either traditional Sheriff style, cattleman's or trooper, style hats, either made of straw or felt. They are worn by a number of highway patrol police officers including those of Arizona, Utah, South Carolina, Ohio, Kansas, Washington State and Maine.
- McChristian, Douglas C. and John P. Langellier "The U.S. Army in the West, 1870-1880: Uniforms, Weapons, And Equipment" P 55
- William K. Emerson Encyclopedia of United States Army Insignia and Uniforms 1996 Oklahoma Predd p 536
- Henry, Mark The US Army in World War II (1): The Pacific 2005 p 8
- McChristian, Douglas C. and John P. Langellier "The U.S. Army in the West, 1870-1880: Uniforms, Weapons, And Equipment" p 55